ssbc / ssb-db2

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

Accept URI IDs in get and getMsg #401

Closed Powersource closed 1 year ago

Powersource commented 1 year ago

I'm trying to get a root msg in https://github.com/ssbc/ssb-tribes2/pull/29 but i have its id in uri form

github-actions[bot] commented 1 year ago

Benchmark results

Part Duration
Create 5000 new messages 435.48ms
Validate 5000 messages 525.12ms
Native to db format 5000 messages 144.58ms
Db to native format 5000 messages 95.76ms
Add 1000 elements 514.67ms
Add 1000 box1 msgs 1102.13ms
Unbox 1000 box1 msgs first run 248.55ms
Unbox 1000 box1 msgs second run 126.34ms
Add 1000 box1 msgs 1049.35ms
Query 1000 msgs first run 50.41ms
Query 1000 msgs second run 14.68ms
Add 1000 box2 msgs 1479.30ms
Unbox 1000 box2 msgs first run 334.92ms
Unbox 1000 box2 msgs second run 175.90ms
Migrate (+db1) 13743.00ms
Migrate (alone) 5039.14ms
Migrate (+db1 +db2) 10002.78ms
Migrate (+db2) 7544.35ms
Migrate continuation (+db2) 1148.29ms
Memory usage without indexes 748.27 MB = 40.28 MB + etc
Initial indexing 1914.11ms
Initial indexing maxcpu=86 6146.35ms
Initial indexing compat 901.47ms
Two indexes updating concurrently 3345.56ms
Key one initial 51.76ms
Key two 0.55ms
Key one again 0.96ms
Reboot and key one again 58.27ms
Latest root posts 2115.83ms
Latest posts 10.88ms
Votes one initial 1701.85ms
Votes again 0.63ms
HasRoot 1525.32ms
HasRoot again 0.34ms
Author one posts 1649.31ms
Author two posts 21.44ms
Dedicated author one posts 1727.39ms
Dedicated author one posts again 0.56ms
DeleteFeed 4022.38ms
Maximum memory usage 1014.90 MB = 57.71 MB + etc
Indexes folder size 10.01mb
Powersource commented 1 year ago

Publish pls :)

Powersource commented 1 year ago

I think/guess that just switching everythng to URIs at once is a simpler DX for developer users