Note (with much engagement) is slowing down my browser #661

Open
opened 2023-10-23 13:06:03 +00:00 by Giszmo · 5 comments
Contributor

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

**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
Kieran added the
enhancement
label 2023-11-09 10:27:34 +00:00
Owner

This is due to the fact that we must load the entire thread into memory, we need a new NIP for loading partial threads.

This is due to the fact that we must load the entire thread into memory, we need a new NIP for loading partial threads.
Author
Contributor

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.

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.
Owner

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

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
Author
Contributor

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.

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.
Kieran added the
75k
label 2023-11-10 16:10:54 +00:00
Kieran added
100k
and removed
75k
labels 2023-11-10 16:12:09 +00:00
Kieran added
200k
and removed
100k
labels 2023-11-27 16:27:47 +00:00
Owner

Basic goal here is to make loading partial threads easier, this is especially useful when some parts of the thread are missing

Basic goal here is to make loading partial threads easier, this is especially useful when some parts of the thread are missing
Kieran added the
P1
label 2024-05-27 14:32:15 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Kieran/snort#661
No description provided.