Storage v1 massively increase storage capacity #371

Merged
sarah merged 1 commits from dan/cwtch:storageEmbiggen into master 2021-06-21 23:39:46 +00:00
Owner
No description provided.
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/217
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/218
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/219
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/220
sarah approved these changes 2021-06-21 23:26:04 +00:00
model/message.go Outdated
@ -27,1 +24,3 @@
Acknowledged bool // peer to peer
Signature []byte // 64 bytes
PreviousMessageSig []byte // 64 bytes
ReceivedByServer bool // 1 byte / messages sent to a server
Owner

bools are 4 bytes to store

bools are 4 bytes to store
@ -115,3 +115,3 @@
func (ss *streamStore) updateBuffer(m model.Message) {
ss.messages = append(ss.messages, m)
ss.bufferByteCount += (model.MessageBaseSize * 1.5) + len(m.Message)
ss.bufferByteCount += (104 * 1.5) + len(m.Message)
Owner

model.MessageBaseSize?

model.MessageBaseSize?
Author
Owner

this is v0, doesn't entierly mater, just hate updating it continually beyond it's old scope. so just put the old number here directly

this is v0, doesn't entierly mater, just hate updating it continually beyond it's old scope. so just put the old number here directly
@ -11,3 +12,4 @@
"sync"
)
// Going above the "if in doubt use" default size of Storagebox docs, that was traced back to
Owner

libsodium secretbox not storagebox

replace comment with "This number is larger that the recommend chunk size of libsodium secretbox by an order of magnitude. Since this code is not performance-sensitive (and is unlikely to gain any significant performance benefit from cache-efficient chunking) this size isn't currently a concern. TODO: revise and evaluate better storage options after beta"

libsodium secretbox not storagebox replace comment with "This number is larger that the recommend chunk size of libsodium secretbox by an order of magnitude. Since this code is not performance-sensitive (and is unlikely to gain any significant performance benefit from cache-efficient chunking) this size isn't currently a concern. TODO: revise and evaluate better storage options after beta"
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/221
sarah merged commit 149f64b030 into master 2021-06-21 23:39:45 +00:00
Sign in to join this conversation.
No description provided.