You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some reason, we get overflowing text in the recents menu:
It's also kind of slow, and I barely have any notes:
Screen.Recording.2025-04-02.at.12.03.04.mov
Here are some things I have noticed:
Its only slow when there are changes to the database.
I don't have a lot of notes, but my notes have a lot of content in them.
We are storing ALL the note content in memory.
I feel like the database query itself is quite fast, but we get a memory bottleneck whenever we try to load all the note contents into the database. That said, it only happens when there are database changes -- meaning that once everything is loaded into the Recent's state, it performs pretty well.
I think we can fix this:
We can keep fetching ALL notes from the database so we always have the latest changes.
But instead of fetching all note content, maybe we can write a query that only fetches the first ~200 characters.
I think I'm correct because our search function works REALLY well, and the only difference between search and recents is that search only fetches a short snippet of the note contents. So there's a pretty high chance that the issue is that we're trying to store all note contents into memory.
For some reason, we get overflowing text in the recents menu:
It's also kind of slow, and I barely have any notes:
Screen.Recording.2025-04-02.at.12.03.04.mov
Here are some things I have noticed:
I feel like the database query itself is quite fast, but we get a memory bottleneck whenever we try to load all the note contents into the database. That said, it only happens when there are database changes -- meaning that once everything is loaded into the Recent's state, it performs pretty well.
I think we can fix this:
I think I'm correct because our search function works REALLY well, and the only difference between search and recents is that search only fetches a short snippet of the note contents. So there's a pretty high chance that the issue is that we're trying to store all note contents into memory.