web: performance!

Instead of actively updating the timeline we render all elements into a
map. When there are new events to render a button shows up at the top
allowing the user to manually view them.

This needs a fix to view more down the page (I set it to 50000 for view
switchign) and I need to fix the initial page view.
This commit is contained in:
Thomas Mathews 2022-12-20 16:55:25 -08:00
parent 5bcb63973c
commit ca7abdd0b6
6 changed files with 124 additions and 73 deletions

View file

@ -41,7 +41,7 @@ function model_process_event(model, ev) {
if (model_event_has_unknown_ids(model, ev))
schedule_unknown_refetch(model);
// Refresh timeline
// Queue event for rendering
model.invalidated.push(ev.id);
}
@ -250,5 +250,6 @@ function new_model() {
friend_of_friends: new Set(),
},
invalidated: [], // event ids which should be added/removed
elements: {},
};
}