Badly optimized code indeed. Now he's going to put the bad code into the GPU and then starts torturing our small machine.
We can do 43,000 id hash check + schnorr verifications a second on the CPU (all threads, blocking everything else) of a Pixel 8. Can you do it faster? Amethyst receives on average 7000 events per second from 13 relays relays on WiFi. The startup collection is about 63000 events for my user. If the number of relays increase, we see even more. Happy to do what you think can be faster than what we already do.
In disk? Phones can only do 1400 insertions per second. Usually loading this info is slower than verifying again. Keeping a cache of all events we receive won't fit in memory. We have to diacard/rotate them periodically.
I don't save anything on disk because that should be the work of a local relay. But that number uses SQLLite on Android. Standard stuff.
I did, but it was last year. Things might have improved a bit. But I don't expect much. Mobile SSDs under Android are not as fast as they could be, especially in lower end phones.