Closed staltz closed 3 years ago
Check the storage cost of the additional privately boolean
I wanted to check what is the overhead of changing the index value from edgeValue
to [edgeValue, privately]
so I tried some alternatives. My @QlCTpv
~/.ssb/db2/indexes/contacts
folder had
Size in bytes | |
---|---|
edgeValue (master branch) |
6 347 000 |
[edgeValue, privately] |
9 155 062 |
[edgeValue, true] or [edgeValue] |
8 048 349 |
[edgeValue, 1] or [edgeValue] |
8 048 275 |
"a" + edgeValue or "b" + edgeValue |
8 223 268 |
"p" + edgeValue or edgeValue |
6 896 162 |
10 + edgeValue or edgeValue |
6 896 153 |
The +10 number hack is the smallest but has the obvious downside of limiting the largest edge distance to 9.
My favorite compromise between small size and low-WTF-effect is "p" + edgeValue
& edgeValue
. Thoughts, @arj03?
Agree, p
seems like the best choice. It seems this (private/public) is actually a good case for keeping layers around. I was keen on removing it before this PR :-)
It seems this (private/public) is actually a good case for keeping layers around. I was keen on removing it before this PR :-)
Yeah! I was pleasantly surprised that it was a neat solution for this use case. :)
Hey @Powersource, feedback I'm looking from you is whether the README (the shape of the API) and tests look good.
@mixmix overall this whole PR, but I suspect you want to take a close look at contacts.js
, the index for flume. While @arj03 could focus on the db2Contacts.js
changes.
other than that lgtm
This fixes #43
db2Contacts.js2
updatedcontacts.js
updatedisFollowing
updated to addopts.details
isBlocking
updated to addopts.details
contact.js
loading partprivately
boolean