Optimize json processing and preloading

- Preload events when added to the EventHolder queue
- Remove relative time formatting from preloader. Just do it when event appears
- Process incoming json in a background queue by default

Changelog-Fixed: Fix wrong relative times on events
Changelog-Changed: Preload events when they are queued
This commit is contained in:
William Casarin
2023-05-03 09:18:09 -07:00
parent 3b541f2ec1
commit 39a324fd1e
10 changed files with 191 additions and 90 deletions

View File

@@ -64,7 +64,7 @@ struct InnerTimelineView: View {
indexed[safe: ind+5]?.0
].compactMap({ $0 }))
preload_events(event_cache: state.events, events: to_preload, profiles: state.profiles, our_keypair: state.keypair, settings: state.settings)
preload_events(state: state, events: to_preload)
}
ThiccDivider()