You are reading content from Scuttlebutt
@mmckegg
Re: %+fBXl12aV

@mix

In patchwork I handle this in modules/message/html/backlinks.js.

Yeah it could be handled in patchcore somewhere. I think I thought about doing it there but it made things more complicated for some reason I can't remember. We can talk about this tonight.

@mix

sounds good. (doubles as a cheeky test message!)

@mix

and a follow-up

@Dominic
Re: %+fBXl12aV

ssb-backlinks is just a single index. You can query all the messages that point to a given message, and it's a single disk seek then returns results. If any message can be a root also, you must do one query, which could return N messages, then you must do N more queries. Even if those messages don't have any backlinks, and the query answers "none" that still has a cost. doing another empty query for every item in a successful query is much slower than just doing one query.

We had this design in patchwork@2 (see legacy api: relatedMessages) it made some big threads really slow to load.

@Dominic

test message of invalid schema though, because it's missing a branch property! ;)

Join Scuttlebutt now