Performance Update

I am disabling saving events as it seems quite stressful on IndexedDB as
well as having to parse everything. We need some smart saving where we
only save data relative to the user. Such as profiles last seen within
the day or so. Anything else can simply be refetched. Storing 50,000 events
does not really help the app that much, but does give it a better
loading start.
This commit is contained in:
Thomas Mathews 2022-12-28 10:07:00 -08:00
parent cf95d29184
commit 4fbb7875fb
2 changed files with 6 additions and 6 deletions

View file

@ -98,13 +98,13 @@ async function webapp_init() {
// Load all events from storage and re-process them so that apply correct
// effects.
await model_load_events(model, (ev)=> {
/*await model_load_events(model, (ev)=> {
model_process_event(model, undefined, ev);
});
log_debug("loaded events", Object.keys(model.all_events).length);
// Update our view and apply timer methods once all data is ready to go.
view_timeline_update(model);
view_timeline_update(model);*/
view_timeline_apply_mode(model, VM_FRIENDS);
on_timer_timestamps();
on_timer_invalidations();
@ -126,16 +126,16 @@ function on_timer_invalidations() {
if (DAMUS.invalidated.length > 0)
view_timeline_update(DAMUS);
on_timer_invalidations();
}, 100);
}, 50);
}
function on_timer_save() {
setTimeout(() => {
const model = DAMUS;
model_save_events(model);
//model_save_events(model);
model_save_settings(model);
on_timer_save();
}, 10 * 1000);
}, 1 * 1000);
}
function on_timer_tick() {