ssbc / ssb-ref

check if a string is a valid ssb-reference
MIT License
14 stars 10 forks source link

The type function is super slow #36

Closed arj03 closed 4 years ago

arj03 commented 4 years ago

I was testing something related to backlinks and found it to be extremely slow. Like 90 seconds for 100k messages on my laptop. Quite a bit back and forth and it seems to be ref.type that is slow because it checks for these invite and address. Without those 2 checks, we go down to 7 seconds.

The reason why I'm opening an issue is because I want to know if they should be part of backlinks or not.

arj03 commented 4 years ago

@staltz might be interesting for you related to manyverse.

staltz commented 4 years ago

Wow! Great find! It makes a lot of sense to me that ssb-backlinks doesn't need to index (pub) addresses and invites, and can focus instead on @, &, % only.

arj03 commented 4 years ago

It doesn't seem like either ssb-server, ssb-db (makes sense as backlinks is plugin). Also ssb-invite and ssb-peer-invites doesn't use backlinks.

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?