[Solved] Thumbnail Switcher, Q: How to overcome bkg process?

Discuss and share scripts and script files...
Post Reply
FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

[Solved] Thumbnail Switcher, Q: How to overcome bkg process?

Post by FluxTorpedoe »

Hi'

Another post reminded me of this simple "Thumbnail Switcher" CTB I use all the time, but haven't managed to get working correctly.

Function:
- If the View is anything but thumbnails, activate Thumbnails #1,
- If it's Thumbs#1, activate Thumbs#2; 2 => 3; 3 => back to 1; etc...

Code: Select all

if (get("View") < 4) || (get("View")==6) { // If NonThumbnails or Thumbnails#3 view
    // Display Thumbnails#1
    #306;
  } elseif get("View")==4 { // If Thumbnails#1 view
    // Display Thumbnails#2
    #307;
  } elseif get("View")==5 { // If Thumbnails#2 view
    // Display Thumbnails#3
    #308;
  }
Working perfectly fine with a few simple pictures.
But with 'heavy' pics (e.g. lots of JPGs or a bunch of TIFs), it just stops thumbs creation and doesn't switch views.
(ok, a small pause before another click does it, but it doesn't feel 'right'... Y'know what I mean! 8) )

I found lots of different ways to voluntarily stop thumbs creation, but I just can't figure out how to 'overcome' this background processing and force the script to go on from there (i.e. correctly detect current View and display next View).

Any idea(s)...?

Thanks, :)
Flux
Last edited by FluxTorpedoe on 14 Mar 2013 08:11, edited 1 time in total.

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by admin »

Should work better next version.

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by FluxTorpedoe »

Well, better than before it seems! :)
But not yet... :?
I'm not just talking about switching between thumbnails, but about trying to do anything (e.g. switching to details) when thumbnails creation is in progress.

I had the opportunity to use it intensively, and things felt a little better in general, but only with Config "Create all thumbnails at once" unchecked [WinXPSP3 + FastPictureViewer Codec Pack].

When activating one of the Thumbnails View, XY's whole interface becomes unresponsive until the necessary thumbnail creation is finished (i.e. visible pics, or all pics, depending on "Create all thumbnails at once").
The only way out is the "ESC" key, though I managed to totally lose XYplorer in "background realm" for a couple of minutes with a 2GB folder of 10Mpixels jpeg. This happened only once, and not with the corresponding RAW folder where "ESC" worked, weird.
Maybe FastPictureViewer is trying too hard to steal the upper hand?...

I don't know whether it's feasible, but maybe even a command would be great, like a "Stop thumbnails creation" (or "Stop ListView background processes"...) ; something like what "ESC" does (but without the "Interrupt current script" part).

Anyway, thanks for the quick update and the hard work! :)

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by admin »

Hm, switching to details should work smoothly now. HOW do you switch to details?

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by FluxTorpedoe »

I use the default "Toggle Details/List View" button, but it's the same via a CTB. As a matter of fact, no button reacts.

I just made two tests, I was wrong in saying the interface becomes unresponsive during thumbs creation:
• the toolbar becomes unresponsive so clicking on buttons does nothing;
• but a click on a Menu pauses the thumbs creation, which resumes nicely when canceling menu access (clicking outside or ESC); or which is correctly discarded when switching to View > Views > List.
• a View List (#304) keyboard shortcut takes immediate action correctly. Complex scripts KS ending with View List work too.

So the foreground isn't totally eaten by thumbs creation since KS and menu are working, only the toolbar it seems...

[XY v12.20.0404 / WinXPSP3 / FastPictureViewer Codec Pack default install]

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by admin »

Try next version.

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by FluxTorpedoe »

[XY 12.20.0405]
I kinda feel bad always putting my finger in :bug: stubborn code-knots... :?
Now it looks like it's starting to work sometimes (but 1 out of ~10 ?).
Menu and KS still working, but toolbar & regular TB still unresponsive; and clicking an (otherwise snappy) CTB can sometimes "hang" everything until thumbs creation is done. :(

I don't know what else I can say or do to help... Just in case:
- this happens regardless of pic type or size (i.e. even with folders of 3Mpix/1.5MB jpegs)
- Needless to say this doesn't happen with already cached thumbs
- Now when thumbs are starting to get created, the first row instantly takes the ThumbsView Background color...

Anyway, thanks for the efforts!

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by admin »

OK, I'll try again. :twisted:

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by FluxTorpedoe »

Not yet, that's really one nasty beast. :evil:

...Wow, after a huge bunch of trials and toolbar changes I just discovered something!

Repro:
• Single Pane in List (or Details) View
• Click once on official "Toggle Details/Thumbnails #1 View" button
• (Wait 1sec then) either:
- Click once on official "Toggle Details/List View", or twice, or 10 times or whatever => no reaction
- Click once on other official buttons, e.g. "Dual Pane" => no reaction
- Click once on "Toggle Details/Thumbnails #1 View" => works perfectly!

So there's something in this button that knows how to cut the crap out of thumbs creation, that all other buttons or scripts don't know of! :roll:
Pffff, at least a small lead, hope this helps... :)

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by klownboy »

Not sure what's happening Don or what changes you've made to track down the background thumbnail process issue on this thread, but I've noticed that with the update from 12.20.0404 to 12.20.0406 that the normal display of previously cached thumbnails has become signifcantly slower. I realize that you are trying to track down the issue of escaping from the thumbnail creation process but it shouldn't in any way sacrifice the speed of normal thumbnail display. It's become plain ugly. One is far more important than the other. I realize we're talking Betas, but I figured I best let you know the coding changes have affected the speed of normal thumbnail display which is obviously not what you want to do. I've checked this on 3 computers. All are signifcantly slower and it's slow even returning back to the same folder thumbs 20 seconds later. In some cases it appears that the thumbs are being drawn twice.

Thanks,
Ken

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by admin »

OK, let's see how the next version fares...

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by admin »

FluxTorpedoe wrote:So there's something in this button that knows how to cut the crap out of thumbs creation, that all other buttons or scripts don't know of! :roll:
Pffff, at least a small lead, hope this helps... :)
I found that little bit of extra knowledge in this button and shared it to the other buttons. :)

klownboy
Posts: 4459
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8037 at 100% 2560x1440

Re: Thumbnail Switcher - Q: How to overcome bkg process?

Post by klownboy »

Thank you Don. The speed of thumbnail display appears to be back in Beta version 12.20.0407 like it was previously. I can quickly change folders loaded with high resolution photographs and the thumbs display quickly (i.e., pop up on the screen all at once and not like they're being recreated from scratch).
Ken

FluxTorpedoe
Posts: 906
Joined: 05 Oct 2011 13:15

Re: [Solved] Thumbnail Switcher, Q: How to overcome bkg proc

Post by FluxTorpedoe »

:appl:
It feeeels good!... :biggrin:

Thanks a lot and congrats! 8)
Flux

admin
Site Admin
Posts: 66305
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: [Solved] Thumbnail Switcher, Q: How to overcome bkg proc

Post by admin »

Aah, finally!!! :D

Post Reply