Conversation
|
Can you give a bit of a motivation/explanation for this MR? As I don't directly see how this fixes the issue in the linked ticket. The 'flickering' is caused by rofi having to redraw its icons because only on the 2nd drawing to the screen the scaling factor is known and it then has to reloads the icons (in the right resolution/size). |
Yeah, the first run without a cache will still flicker. I save the cache icons at the same size they load at, so it should reduce flicker once everything is cached since it won't need to call |
|
I suspect the flicker is still there, it is just less visible. All the loading logic is unchanged, beside the speed of loading the icon. Let me play with the patch. |
It will still happen with big icons, i suppose :) |
|
I am on X11 (3xfhd) and a fast machine with a fast disk I don't notice a lot of speedup. But this might not be a fair check. Will check later on a slower machine with 4k screen and wayland. I do notice that the cache is growing in size pretty quick, I see there is no limit per-image size. If I use the fullscreen-preview theme. If we add this, we should probably add some measures to make sure the cache does not explode. I've seen several rofi scripts that preview a large images.. @lbonn what do you think? |
Sure that i need to add an option to disable the cache, or skip saving for images > 512x512/256x256/128x128px? |
nextbranch and notmasterrelated to #2165
save cache in
~/.cache/rofi-icon-cache/<hash>.rofi