Is the bottleneck rendering the events, retrieving them from relays or processing and prioritizing them?
Discussion
Rendering heavy messages (lots of tags, big texts, etc) while receiving > 50 events per second seems to be the problem. Not enough memory and threads to do everything in parallel.
I ended up rewriting my note parser in C because of slow perf on large events
What about Rust? 🥺
C is just easier to integrate into xcode builds
🤔 https://bignerdranch.com/blog/building-an-ios-app-in-rust-part-1-getting-started-with-rust/
I’ll try to check it out.
It's funny that we have a media engine but not a JSON parser engine in mobile processors.
If there are not enough resources, I would suggest focusing on prioritization and just rendering the rest in a queue with a job pool.
Would an aggregation service for reactions and reply counts, etc help? Could reduce volume anyway.
By volume, reactions are typically highest.
No relays do it yet, however it could make sense to start returning metadata like my REST endpoint.
Rust would def be great for this since it’s already integrated into the Android operating system.
https://security.googleblog.com/2021/04/rust-in-android-platform.html?m=1
Did not know that