ssbc / ssb-db2

A new database for secure-scuttlebutt
47 stars 8 forks source link

Add hooks to compat functions #427

Closed Powersource closed 1 year ago

Powersource commented 1 year ago

Made by @cooldracula in https://github.com/ssbc/ssb-db2/pull/424 first

github-actions[bot] commented 1 year ago

Benchmark results

Part Duration
Create 5000 new messages 266.84ms
Validate 5000 messages 352.88ms
Native to db format 5000 messages 78.55ms
Db to native format 5000 messages 67.63ms
Add 1000 elements 464.94ms
Add 1000 box1 msgs 730.33ms
Unbox 1000 box1 msgs first run 151.11ms
Unbox 1000 box1 msgs second run 69.11ms
Add 1000 box1 msgs 691.08ms
Query 1000 msgs first run 29.01ms
Query 1000 msgs second run 8.05ms
Add 1000 box2 msgs 1040.77ms
Unbox 1000 box2 msgs first run 245.66ms
Unbox 1000 box2 msgs second run 109.31ms
Migrate (+db1) 8589.40ms
Migrate (alone) 2801.69ms
Migrate (+db1 +db2) 5037.82ms
Migrate (+db2) 4198.15ms
Migrate continuation (+db2) 743.88ms
Memory usage without indexes 770.11 MB = 35.87 MB + etc
Initial indexing 1098.91ms
Initial indexing maxcpu=86 4012.33ms
Initial indexing compat 296.51ms
Two indexes updating concurrently 1861.16ms
Key one initial 58.74ms
Key two 0.96ms
Key one again 0.96ms
Reboot and key one again 61.49ms
Latest root posts 1134.83ms
Latest posts 8.65ms
Votes one initial 949.69ms
Votes again 0.41ms
HasRoot 850.97ms
HasRoot again 0.41ms
Author one posts 929.02ms
Author two posts 13.07ms
Dedicated author one posts 926.79ms
Dedicated author one posts again 0.42ms
DeleteFeed 4399.78ms
Maximum memory usage 854.54 MB = 63.91 MB + etc
Indexes folder size 10.01mb
Powersource commented 1 year ago

feeling allowed to merge this since it's technically not my PR, i'm just a reviewer ;)

Powersource commented 1 year ago

v8.1.0