d2phap / ImageGlass

🏞 A lightweight, versatile image viewer
https://imageglass.org
Other
7.8k stars 501 forks source link

HEIC files are very slow to open #1473

Closed MoemenShahawy closed 2 months ago

MoemenShahawy commented 1 year ago

System information:

To Reproduce

Steps to reproduce the behavior:

  1. Open picture

Every other extension opens fine. Heavy PNG files take 2 seconds to load. HEIC photos, which are the standard now on modern iphones, take around 3 to 4 seconds to load and an additional 3 seconds between every image and the next.

I saw that the issue has been reported in early 2021, but seems like it's still around

The native Windows Photos app takes 10-11 seconds

So there is something that ImageGlass does that makes it 3x faster... is there a way to improve upon that as this seems to be a major issue with all photo viewers?

I'm talking 1.2mb photos take 3 seconds to load, while 5 or 6mb photos open almost instantly I'm very curious to know the cause

running i5-8300H with 32gb ram and this happens with any photo taken with an iphone, like the same given in the other issue #995

MoemenShahawy commented 1 year ago

tested v9.3 beta a bit faster, but loading all HEIC 90° rotated unlike v8 stable

d2phap commented 2 months ago

HEIC format is always slower compared to others such as JPG, PNG, JXL,... Unfortunately, ImageGlass does not have built-in decoders, it uses the third-party library Magick.NET which also uses other third-party libraries to decode the image formats. ImageGlass can only help by preloading the images into memory. Hence, there is no fix for this.