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

Irfanview PlugIn Optimizations #19

Open
2 tasks
TPS opened this issue Jan 17, 2021 · 6 comments
Open
2 tasks

Irfanview PlugIn Optimizations #19

TPS opened this issue Jan 17, 2021 · 6 comments

Comments

@TPS
Copy link

TPS commented Jan 17, 2021

@ilyakurdyukov Based on #11 & #18 (comment), I'd like to suggest for the prebuilt released IV plugin

  • exposing the available settings via the UI in a compact way
  • building against libjpeg-turbo by default for the sake of performance. Loading via the current plugin takes ~2⅛× the time (in my tests), which is why imho Irfan has it disabled by default. IV is known as a high-speed viewer for the last 24½ years, so improving that loading time any amount would make more likely to be enabled (hopefully, eventually by default) & expose your amazing work more widely.
@ilyakurdyukov
Copy link
Owner

(1) At the moment the plugin works in the highest quality mode (as -q6 in the command line version) and this is set from IrfanView application, but with predefined settings. I suggested making a UI dialogue, but Irfan did not want to implement such functionality yet - until there were enough plugin users.

Here's a discussion of which UI controls are needed: https://irfanview-forum.de/showthread.php?t=12678
It seems that there are still few plugin users so far.

(2)

Loading via the current plugin takes ~2⅛× the time

Than a plugin built with libjpeg-turbo or loading without plugin?

high-speed viewer

Quality and speed don't match well, but I tried to make it work fast.

@TPS
Copy link
Author

TPS commented Jan 17, 2021

This is, of course, a bit of chicken-&-egg problem because of tyranny-of-the-default issue: most users won't use because it isn't active by default & so they've no idea it exists. Perhaps a Settings button next to the QS checkbox option in IV would suffice, as is done with other format plugins? Especially if combined with a default of activating only below 𝑥 Mpixels (as requested in the forum thread) & changeable in that Settings option.

Loading via the current plugin takes ~2⅛× the time

Than a plugin built with libjpeg-turbo or loading without plugin?

With the QS checkbox in IV off vs on using your latest build.

high-speed viewer

Quality and speed don't match well, but I tried to make it work fast.

I think you generally succeeded admirably, but these last few tweaks should enable more folks to appreciate it.

@ilyakurdyukov
Copy link
Owner

With the QS checkbox in IV off vs on using your latest build.

It depends on your hardware because jpegqs uses multithreading (max 16 threads for this build). Also faster for AVX2 compared to SSE2.

It seems like it should run 9% faster with libjpeg-turbo (tested on Linux), but I can't build it correctly with SIMD on Windows using MSYS2 (couldn't link). And if I try to link with the pre-built libjpeg-turbo from the MSYS2 repository - IV crashes when the jpeg image is loaded.

@ilyakurdyukov
Copy link
Owner

ilyakurdyukov commented Jan 18, 2021

It looks like I did it, but I'm pretty sure you won't be able to notice the difference in speed. Only 2x difference in plugin size. I've added to releases so you can try.

@ilyakurdyukov
Copy link
Owner

ilyakurdyukov commented Jan 18, 2021

You can write to Irfan by email and convince him that you need a UI, maybe he will agree to add it for the next version.

Have you noticed the improvement in the images yourself?

@TPS
Copy link
Author

TPS commented Jan 18, 2021

It looks like I did it, but I'm pretty sure you won't be able to notice the difference in speed. Only 2x difference in plugin size. I've added to releases so you can try.

I'm going through my tests, which will take real-world cases over a few days. Watch this space.
Also, ~150 KB increased plugin size is nothing nowadays.

You can write to Irfan by email and convince you that you need a UI, maybe he will agree to add it for the next version.

I will, once I get through below.

Have you noticed the improvement in the images yourself?

The actual rendering difference, yes: with my files, it can be subtly to substantially perceptually better. The speed tests are what I'll be going through for the next little while.

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

No branches or pull requests

2 participants