Note (with much engagement) is slowing down my browser #661
Labels
No Label
1000k
100k
10k
200k
20k
500k
50k
5k
75k
backend
blocked:design
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
P1
P2
P3
question
scope:intl
scope:nip
scope:query_tracing
scope:ux
wontfix
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Kieran/snort#661
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
When trying to interact with note17gfm0k0ssw4qctpge32dp3nulu975mjpdl9nqmrs78msp622d90qvdral4 my browser grinds to a halt.
To Reproduce
https://snort.social/e/note17gfm0k0ssw4qctpge32dp3nulu975mjpdl9nqmrs78msp622d90qvdral4
Expected behavior
UI working while more stuff is being loaded as slow as needed to ensure the UI is fine.
Desktop (please complete the following information):
Debian, FF118
This is due to the fact that we must load the entire thread into memory, we need a new NIP for loading partial threads.
Why "must"? And why do you need a NIP to solve it? Find 50 direct replies and when the user scrolls, load more. Not sure what I'm missing.
every reply is e tagging the root, so. if you want to load the root and build a tree of replies, you need to load everything into memory and compute the tree, its not the rendering that is slow
I think I understand the nips but when the client is supposed to load a note, it can choose to ask the relays for as much as it can swallow. The event itself and 50 direct replies for example. This should fit in memory and get there in no time. The user now doesn't know which of these replies got themselves replies or likes etc. but he gets something to digest while the client gets more and the rest is just numbers on notes or more notes off screen, so no layout shifts if it gets loaded later.
Load up to one direct reply for each of the first level replies to know what are threads and what are leaf notes. Now a [+] can be displayed for threads.
This initial loading really is tricky but I think it can be much improved without relays providing extra data.
I guess what you want is that the relays deliver these numbers directly with the notes but as there is no consistency across nostr, that is hard to do. For example I would prefer a client that straight out disregards reactions from outside my follows' follows at least in a first pass. That's too much for relays to consider.
Basic goal here is to make loading partial threads easier, this is especially useful when some parts of the thread are missing