commit 17ec0c0a9967160852346e711aece44e6507c290
parent 09cd8ff379c9f8924613d4fa05db1acfb50a4eca
Author: William Casarin <jb55@jb55.com>
Date: Sun, 24 Dec 2023 12:28:25 -0800
pool: process all events as soon as possible
before we were only processing one event per frame. This ensured that
not too much time is spent processing events in a single frame.
Unfortunately since we don't have persistent frame rendering, this is
not reliable.
We can look into limiting the number of events processed per frame if
message processing gets heavy.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/app.rs b/src/app.rs
@@ -119,7 +119,7 @@ fn try_process_event(damus: &mut Damus, ctx: &egui::Context) {
damus.pool.keepalive_ping();
// pool stuff
- if let Some(ev) = damus.pool.try_recv() {
+ while let Some(ev) = damus.pool.try_recv() {
let relay = ev.relay.to_owned();
match ev.event {