Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hasDiskAccess config #425

Merged
merged 1 commit into from
Oct 26, 2023
Merged

Add hasDiskAccess config #425

merged 1 commit into from
Oct 26, 2023

Conversation

Powersource
Copy link
Collaborator

In ssb-tribes2-demo we currently have to patch ssb-db2 to get it to run, see ssbc/ssb-tribes2-demo#11 https://github.com/ssbc/ssb-tribes2-demo/blob/3d4425fec46894b4c0db601c312b65e9d58fe9ae/patches/ssb-db2%2B7.1.1.patch This config option should allow us to remove that patch.

I didn't add a test here but I'll make a PR in ssb-tribes2-demo where i test it

@Powersource
Copy link
Collaborator Author

tests passing locally (or they're at least not failing more than on master :p )

@Powersource
Copy link
Collaborator Author

The demo works now without the patch! ssbc/ssb-tribes2-demo#12

@github-actions
Copy link

Benchmark results

Part Duration
Create 5000 new messages 525.14ms
Validate 5000 messages 503.46ms
Native to db format 5000 messages 136.80ms
Db to native format 5000 messages 114.10ms
Add 1000 elements 508.36ms
Add 1000 box1 msgs 1369.12ms
Unbox 1000 box1 msgs first run 259.53ms
Unbox 1000 box1 msgs second run 119.17ms
Add 1000 box1 msgs 1278.90ms
Query 1000 msgs first run 50.98ms
Query 1000 msgs second run 20.51ms
Add 1000 box2 msgs 2064.28ms
Unbox 1000 box2 msgs first run 499.30ms
Unbox 1000 box2 msgs second run 229.38ms
Migrate (+db1) 14038.92ms
Migrate (alone) 4966.18ms
Migrate (+db1 +db2) 10170.64ms
Migrate (+db2) 6711.80ms
Migrate continuation (+db2) 1323.43ms
Memory usage without indexes 778.61 MB = 42.36 MB + etc
Initial indexing 1632.20ms
Initial indexing maxcpu=86 5420.59ms
Initial indexing compat 867.44ms
Two indexes updating concurrently 2965.29ms
Key one initial 80.26ms
Key two 2.80ms
Key one again 6.12ms
Reboot and key one again 80.92ms
Latest root posts 1876.15ms
Latest posts 8.77ms
Votes one initial 1519.71ms
Votes again 0.48ms
HasRoot 1325.92ms
HasRoot again 0.36ms
Author one posts 1449.62ms
Author two posts 20.07ms
Dedicated author one posts 1485.88ms
Dedicated author one posts again 1.10ms
DeleteFeed 5748.00ms
Maximum memory usage 858.96 MB = 63.91 MB + etc
Indexes folder size 10.01mb

Copy link
Member

@staltz staltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this seems okay.

@Powersource Powersource merged commit de08240 into master Oct 26, 2023
5 checks passed
@Powersource Powersource deleted the hasdiskaccess-conf branch October 26, 2023 14:46
@Powersource
Copy link
Collaborator Author

v7.2.0

@Powersource
Copy link
Collaborator Author

woops i think setting this to false doesn't force it to be false. but i think the only real usecase i know of is electron, and there you'd want to set it to true so no biggie

Copy link

github-actions bot commented Nov 2, 2023

Benchmark results

Part Duration
Create 5000 new messages 334.00ms
Validate 5000 messages 464.73ms
Native to db format 5000 messages 99.79ms
Db to native format 5000 messages 96.45ms
Add 1000 elements 369.15ms
Add 1000 box1 msgs 978.68ms
Unbox 1000 box1 msgs first run 194.56ms
Unbox 1000 box1 msgs second run 95.21ms
Add 1000 box1 msgs 942.89ms
Query 1000 msgs first run 33.07ms
Query 1000 msgs second run 11.25ms
Add 1000 box2 msgs 1300.81ms
Unbox 1000 box2 msgs first run 353.54ms
Unbox 1000 box2 msgs second run 182.83ms
Migrate (+db1) 10540.18ms
Migrate (alone) 3288.94ms
Migrate (+db1 +db2) 7611.24ms
Migrate (+db2) 5249.50ms
Migrate continuation (+db2) 1020.84ms
Memory usage without indexes 764.32 MB = 42.89 MB + etc
Initial indexing 1425.78ms
Initial indexing maxcpu=86 3983.73ms
Initial indexing compat 576.31ms
Two indexes updating concurrently 2492.38ms
Key one initial 71.45ms
Key two 1.89ms
Key one again 0.82ms
Reboot and key one again 67.10ms
Latest root posts 1587.13ms
Latest posts 8.41ms
Votes one initial 1294.70ms
Votes again 0.33ms
HasRoot 1157.09ms
HasRoot again 0.55ms
Author one posts 1243.15ms
Author two posts 14.75ms
Dedicated author one posts 1255.64ms
Dedicated author one posts again 0.47ms
DeleteFeed 5330.58ms
Maximum memory usage 859.96 MB = 59.45 MB + etc
Indexes folder size 10.01mb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants