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

Do something with Windows thumbnail cache #1872

Open
mirh opened this issue Mar 19, 2024 · 2 comments
Open

Do something with Windows thumbnail cache #1872

mirh opened this issue Mar 19, 2024 · 2 comments

Comments

@mirh
Copy link

mirh commented Mar 19, 2024

Is your feature request related to a problem? Please describe.

So.. I had this beefy 93MB png image, and for the lulz I tried to compare IG's opening speed to the godawful W10 photo viewer.
To my dismay (at least after the first times, once the OS in all its wisdom decided to finally prefetch everything) that seemed ahead, which was counterintuitive to my usual experience.
After squeezing a bit further my eyes, I noticed that for a good half a second the fine detail in grilles and whatnot isn't really there. A low resolution version is first loaded, and only then the full quality appears.

Very much presumably (as side-way hinted here?) that's because they are first loading the thumbnails made beforehand by Windows explorer? In a very unscientific experiment after using the windows clean-up tool I seemed to corroborate this hypothesis.

Describe the solution you'd like

Hook up anything of this probably?
https://learn.microsoft.com/en-us/windows/uwp/files/thumbnails
https://learn.microsoft.com/en-us/windows/win32/api/thumbcache/nn-thumbcache-ithumbnailcache

Describe alternatives you've considered

Another possibility is just that IG has something else that could be further optimized, but v9 seems already so sleek otherwise.
It's no biggie then (particularly when IG already does everything in one second tops) but still I felt there could be room for improvement.

Additional context

*I guess* this may also help (or if not any interact) with some of the built-in cache related bugs that I noticed in the tracker.

@d2phap
Copy link
Owner

d2phap commented Mar 22, 2024

Hi @mirh,

After reading this many times, I still don't understand what you want to suggest here 😅.

FYI:

  • ImageGlass 9 gets the thumbnails from Windows Explorer. If the format is not supported, it will use Magick.NET to create a thumbnail.
  • Some thumbnail extensions for Windows Explorer might affect the speed of loading as well. I've recently installed an extension to generate thumbnail for SVG format, it's much slower than using Magick.NET.

Another possibility is just that IG has something else that could be further optimized

ImageGlass v9.0 is the "new feature" cycle. v9.1 will be focusing on optimization.
I have already done a lot of optimizations in the latest code in develop branch. The app reduces ~150ms for cold start.

@mirh
Copy link
Author

mirh commented Mar 22, 2024

ImageGlass 9 gets the thumbnails from Windows Explorer.

I see. But gallery view aside, do you also try to show/use them for the "main image opening" step?
I was saying that I suspect windows' photo viewer can be faster, because at least showing the low-res preview before decoding of the real thing has been completed can be a tangible speed win for bigger files.

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

No branches or pull requests

2 participants