Skip to content

Debug Recents Menu #74

@zeim839

Description

@zeim839

For some reason, we get overflowing text in the recents menu:

Image

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:

  1. Its only slow when there are changes to the database.
  2. I don't have a lot of notes, but my notes have a lot of content in them.
  3. 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:

  1. We can keep fetching ALL notes from the database so we always have the latest changes.
  2. 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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions