Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad performance/lagging in tabs "recent notes" and "browse" #1417

Open
fybx opened this issue Jan 16, 2025 · 4 comments
Open

Bad performance/lagging in tabs "recent notes" and "browse" #1417

fybx opened this issue Jan 16, 2025 · 4 comments

Comments

@fybx
Copy link
Contributor

fybx commented Jan 16, 2025

First of all, here are the related issues: #1110, #1237, #993 and #293.

Here's a recent screen recording, showing the lag I'm talking about. It should be clear that many frames get skipped when swiping the note gallery:

out2.mp4

I've prompted Claude 3.5 Sonnet about the issue, the related pieces of the source code, and it was able to claim a few "necessary" improvements, however I'm in no position to analyse Dart/Flutter code or judge anyone's skills, so giving just a heads up.

Thanks in advance.

@QubaB
Copy link
Contributor

QubaB commented Feb 17, 2025

It also occurs on my tablet, but I don't consider it a problem. The gradual display of thumbnails is a result of the thumbnails only loading when they are needed.

@fybx
Copy link
Contributor Author

fybx commented Feb 17, 2025

I don't consider it a problem

but it actually is a problem, and a fairly easy to solve one. It gets worse when you have many, many notes; even with a fairly organized folder setup you'll still get artifacts which is not cool.

thumbnails only loading when they are needed

Bear with me here, I'm only assuming: the thumbnails are getting lazily "generated" from the actual "data", right? If that's the case, a simple solution would be to generate a preview image when a note is saved to disk, and store the preview image in the note. The preview image can be small, too; that'll keep the file size small.

@QubaB
Copy link
Contributor

QubaB commented Feb 17, 2025

Thumbnails are created when note is saved. Thumbnails are png images and are saved as filename.sba.p. So they are not generated on demand. Problem is with loading them to memory and rendering it.

Each thumbnail has size 50kB-1MB (depending on note), it takes time to read it and display.

@fybx
Copy link
Contributor Author

fybx commented Feb 17, 2025

Hmm, then there must be some other bottleneck since it really shouldn't be an issue to load and render literal PNG files on mid to high end devices. I'll reserve time to look into this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants