Directory Opus extremely slow on gif and archive

After spending some of today looking at this in more detail, we've decided it will take longer than I first thought, and be part of a more general overhaul of the viewer (to use GPU acceleration, among other changes).

Retrofitting it to the existing animated gif code is looking too complex for the benefit it would bring and user demand vs other changes.

However, if you're happy with the viewer you get in Explorer then you can use the same viewer in Opus. You aren't forced to use your viewer for gif or any other image type. You can configure Opus to use the Windows Photo Viewer for some or all image types, if that's the one you prefer. See How to stop the Opus image viewer from being used by default

And if you just want the first frame of the image in the Opus preview pane, which is what you get in Explorer's preview pane, then disabling the Animated Gif plugin entirely in Opus will give you that (Opus falls back on its internal gif code, which only shows the first frame).

To give more detail on why those images take so long to load with the current code/design:

The animated gif plugin for Opus pre-renders every frame before it starts playing. This is fine with most animated gifs, but ones which are high resolution and high framerate will take a couple of seconds to render. (Those images are more suited to the MP4 format than gif, but we can't deny such things exist, or that we load them slowly, so we do want to improve this.) The design is partly due to some of the unique features the plugin has over other gif viewers, such as being able to play gifs backwards, and flatten everything into a grid showing every frame at once. But it does mean the usual case of playing the animation forward takes longer than if each frame was decoded on the fly.

Making it start playing as soon as the first frame was decoded, and decode the subsequent frames in parallel with playback, was my initial plan, but the logistics of retrofitting that to the old code ended up being quite tangled, and with it being a larger piece of work than expected, we'd rather put that time into a more general viewer overhaul, which will be able to speed this up but also bring a lot of other features people have asked for over the years.

2 Likes