Page 1 of 1
[Solved] Thumbnail Switcher, Q: How to overcome bkg process?
Posted: 30 Oct 2012 09:03
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!

)
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
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 08 Mar 2013 15:39
by admin
Should work better next version.
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 11 Mar 2013 14:09
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!

Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 11 Mar 2013 14:57
by admin
Hm, switching to details should work smoothly now. HOW do you switch to details?
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 12 Mar 2013 10:49
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]
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 12 Mar 2013 11:58
by admin
Try next version.
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 13 Mar 2013 09:23
by FluxTorpedoe
[XY 12.20.0405]
I kinda feel bad always putting my finger in

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!
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 13 Mar 2013 09:43
by admin
OK, I'll try again.

Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 13 Mar 2013 13:50
by FluxTorpedoe
Not yet, that's really one nasty beast.
...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!

Pffff, at least a small lead, hope this helps...

Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 13 Mar 2013 15:35
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
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 13 Mar 2013 20:12
by admin
OK, let's see how the next version fares...
Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 13 Mar 2013 21:06
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!

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.

Re: Thumbnail Switcher - Q: How to overcome bkg process?
Posted: 13 Mar 2013 23:22
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
Re: [Solved] Thumbnail Switcher, Q: How to overcome bkg proc
Posted: 14 Mar 2013 08:15
by FluxTorpedoe
It feeeels good!...
Thanks a lot and congrats!
Flux
Re: [Solved] Thumbnail Switcher, Q: How to overcome bkg proc
Posted: 14 Mar 2013 08:42
by admin
Aah, finally!!!
