Oh, man. Managed to reduce runtime performance cost on user search in Damus on my local branch by up to 92% by implementing a Trie. Tested empirically on my iOS simulator using nostr:npub1aeh2zw4elewy5682lxc6xnlqzjnxksq303gwu2npfaxd49vmde6qcq4nwx ‘s profile with ~2,000 follows. From ~650 milliseconds to ~50 milliseconds (per character typed!). Can’t wait to push out this pull request. This change should make Damus much more performant when @ mention user searching while composing a note with a large follow list.

Reply to this note

Please Login to reply.

Discussion

50ms is below human threshold on noticing change after action, so that's practically realtime 😅

When in doubt, trie again…

🤣

then when too much broken , what should I do ?

I’m so pumped for this!

🔥

common terry W

Except it's banned in a week 🤡

It’s not going to get banned. nostr:npub1xtscya34g58tk0z605fvr788k263gsu6cy9x0mhnm87echrgufzsevkk5s and team have worked too hard to lose now.

Nah, just some features 🤡

Too bad I can’t update Damus ever again

Yes!!!!!!!