Lags in the DMs area #954

Open
opened 2025-02-05 10:02:04 +13:00 by dtonon · 9 comments
dtonon commented 2025-02-05 10:02:04 +13:00 (Migrated from github.com)

I'm experience significant lags in the DMs section, both scrolling the conversations and typing a new message.
I'm on 9ea49678, but I remember the problem was present also in previous versions.

I'm experience significant lags in the DMs section, both scrolling the conversations and typing a new message. I'm on `9ea49678`, but I remember the problem was present also in previous versions.
mikedilger commented 2025-02-05 16:05:17 +13:00 (Migrated from github.com)

I did some major rework of when gossip repaints today. So whatever was happening on 9ea49678 probably isn't relevant anymore. Please try 55fcc58385

I did some major rework of when gossip repaints today. So whatever was happening on `9ea49678` probably isn't relevant anymore. Please try 55fcc5838552cd49d69e209c637fad9459402578
dtonon commented 2025-02-05 21:41:25 +13:00 (Migrated from github.com)

Now I'm on 2b34ac74, the lag persists. If I increase the FPS to 60 (I read your note about that) the situation improve a little, but there is still a clear difference compared with the speed of the main feed and the compose area.

Now I'm on 2b34ac74, the lag persists. If I increase the FPS to 60 (I read your note about that) the situation improve a little, but there is still a clear difference compared with the speed of the main feed and the compose area.
mikedilger commented 2025-02-05 23:44:32 +13:00 (Migrated from github.com)

If I go to a particularly long DM conversation it gets a tad bit slower. I'll keep an eye on this one, I'm not sure why.

If I go to a particularly long DM conversation it gets a tad bit slower. I'll keep an eye on this one, I'm not sure why.
dtonon commented 2025-02-06 01:00:18 +13:00 (Migrated from github.com)

My last feedback is related to our conversation.
I can intuitively understand the issue when scrolling, but why the lag when typing? It's a refresh problem in egui?

My last feedback is related to our conversation. I can intuitively understand the issue when scrolling, but why the lag when typing? It's a refresh problem in egui?
mikedilger commented 2025-02-07 08:49:49 +13:00 (Migrated from github.com)

It is not happening for me, so we have to figure out what is different. I have Maximum FPS set to 20. I have the spinner turned on (so I can see when frames refresh and when refresh is lagging). I am not using the WGPU renderer.

It might be related to the WGPU render so I'm going to try that... nope, still perfectly responsive and smooth.

I may have to try it on MacOS next.

It is not happening for me, so we have to figure out what is different. I have Maximum FPS set to 20. I have the spinner turned on (so I can see when frames refresh and when refresh is lagging). I am not using the WGPU renderer. It might be related to the WGPU render so I'm going to try that... nope, still perfectly responsive and smooth. I may have to try it on MacOS next.
mikedilger commented 2025-02-07 09:13:53 +13:00 (Migrated from github.com)

I can't reproduce on MacOS either. Key repeat goes as fast in gossip as it does in terminal in the DM area. And my max fps was as low as 15. I'm kinda out of ideas.

I can't reproduce on MacOS either. Key repeat goes as fast in gossip as it does in terminal in the DM area. And my max fps was as low as 15. I'm kinda out of ideas.
dtonon commented 2025-02-07 22:10:30 +13:00 (Migrated from github.com)

I did a test on my old Thinkpad X220 and it's visibility faster on our conversation, I can spot a really little lag compared to chats with only 2/3 messages, but it's barely perceptible. So it definitively seems a problem with my mac.

This is my compile command:

RUSTFLAGS="-C target-cpu=native --cfg tokio_unstable" cargo build --release --features=lang-cjk,video-ffmpeg; and strip ./target/release/gossip

Note: the feed, with many more notes, doesn't show any problem.

I did a test on my old Thinkpad X220 and it's visibility faster on our conversation, I can spot a really little lag compared to chats with only 2/3 messages, but it's barely perceptible. So it definitively seems a problem with _my_ mac. This is my compile command: ``` RUSTFLAGS="-C target-cpu=native --cfg tokio_unstable" cargo build --release --features=lang-cjk,video-ffmpeg; and strip ./target/release/gossip ``` Note: the feed, with many more notes, doesn't show any problem.
mikedilger commented 2025-02-08 09:24:50 +13:00 (Migrated from github.com)

Here's a few things I can rule out:

  • Your compile command is fine. I cannot think of anything about it that would be relevant.
  • I checked that the DM area isn't decrypting every time (it's not).
  • The DM feed is generated periodically like the other feeds, that generation won't affect the UI speed.

Most of the feed rendering logic is the same in the DM area as it is in the normal feed which isn't having the problem. So there must be something in the DM-specific rendering code somewhere. It could be in any of these places:

  • post.rs: that post box is always open in the DM feed. Can you start a note in the main feed and see if that slows down the main feed?
  • render_dm_feed
  • render_dm_note
  • code that deals with image/video privacy issue in DMs
Here's a few things I can rule out: * Your compile command is fine. I cannot think of anything about it that would be relevant. * I checked that the DM area isn't decrypting every time (it's not). * The DM feed is generated periodically like the other feeds, that generation won't affect the UI speed. Most of the feed rendering logic is the same in the DM area as it is in the normal feed which isn't having the problem. So there must be something in the DM-specific rendering code somewhere. It could be in any of these places: * post.rs: that post box is always open in the DM feed. Can you start a note in the main feed and see if that slows down the main feed? * render_dm_feed * render_dm_note * code that deals with image/video privacy issue in DMs
dtonon commented 2025-02-11 05:46:45 +13:00 (Migrated from github.com)

Can you start a note in the main feed and see if that slows down the main feed?

As mentioned, on the main feed, even if it contains a lot more notes than our conversation, the scrolling and the composing area work perfectly.
Let me know if I can help you debug the issue.

> Can you start a note in the main feed and see if that slows down the main feed? As mentioned, on the main feed, even if it contains a lot more notes than our conversation, the scrolling and the composing area work perfectly. Let me know if I can help you debug the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
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
nostr/gossip#954
No description provided.