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

caching of application icons #84

Open
Rairosu opened this issue May 17, 2024 · 2 comments
Open

caching of application icons #84

Rairosu opened this issue May 17, 2024 · 2 comments

Comments

@Rairosu
Copy link

Rairosu commented May 17, 2024

Currently application icons are not being cached, which results in onagre microfreezing everytime I try to search for an application.

If there is no specific reason against caching those icons, I would like those icons to be cached.

@oknozor
Copy link
Collaborator

oknozor commented May 17, 2024

There is a first query to build the icon index then its cached on every subsequent request:

.with_cache()

That said, in the current implementation, the cache still need to be loaded on every start.

We could store this in db to make it available on next launch.
Note that it has the potential to be out of sync if the user uninstall or add new desktop entries, change their theme etc.

A correct implementation should greedily load the cache on start, then fetch the up to date icon index in the background and replace the current cache with actual runtime values.

PRs welcome :)

@Rairosu
Copy link
Author

Rairosu commented May 17, 2024

I looked at this line already and my point is that it is missing for the else case, but i didn't want to submit a pr for one line of code. The idea of storing it in the db sounds nice, as it still stutters on startup a bit, even with caching all icons, maybe i get around to doing a pr for that ^^

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