Open DrewNaylor opened 1 year ago
It's both slow and choppy.
The way the icons will be cached is we'll add each of them to a dict (if it's not already in there) when loading the All Apps list and any time we want to grab an icon, we'll check the dict for the .desktop file and associated icon path. That way we only load everything once, but we still need a way to refresh the dict if the icon theme changes or a .desktop file's Icon
key's value changes. Actually, maybe we can just store the Icon
key value next to the .desktop file and look it up with the PyXDG stuff if it's not too slow (otherwise we should only look it up once, when we load the list, and also whenever the list or anything updates). Do whatever is the most responsive, even if it costs a few extra kilobytes.
Something else that should help is I think we should do culling for icons like my idea for doing culling on tile content.
I just didn't want to implement the caching now, sorry if it's slow. Note: it can be even slower if a particular app doesn't have an icon I think, such as RetiledStart and RetiledSearch as of right now.