Freezing / lagging during thumbnail creation

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

m48tx wrote: 27 Mar 2020 16:42 When I follow your instructions, this is what happens...
"The system can't find the specified file" error - I'm not sure if it can't find XYplorer possibly because of spaces in your path or it can't find "cmd". Have you tried modifying the one liner to run by itself (i.e., not using the Thumbnail Maintenance script)? You could try triple quoting """<xy>""".
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

m48tx
Posts: 285
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx »

I've tried everything I can think of and I still get the script error. Thanks so much for your help, but I kinda give up.
Last edited by m48tx on 30 Mar 2020 04:57, edited 1 time in total.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

m48tx wrote: 27 Mar 2020 17:19 I had to enter ::e get("instance"); but regardless, thanks for this.
Sorry, apply this tweak to eliminate the need for the "::"

Tweak: set to 1 to detect script in AB without ::
ScriptSmartDetect=1
How to tweak: https://www.xyplorer.com/faq-topic.php?id=tweak
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

m48tx
Posts: 285
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx »

Thanks for identifying this tweak. Works like a charm.
Last edited by m48tx on 30 Mar 2020 04:58, edited 1 time in total.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

Hi m48tx, it still bothers me why you have no success running that SC run script line. Could you try running the following from the Scripting menu > Run script... Change the path in that line to one where you have pictures, but don't have that as your current path.

Code: Select all

   run "<xy> /path=""D:\your picture path\"" /new /win=tray /script=""::if(replacelist(get('view'), '0|1|2|3|4|5|6|7|8|9', '302|303|304|305|306|307|308|309|313|314','|') != 306){#306;wait 50;#1001;}#501;wait 50;#1001;if(get('instance')=='2') {exit 'n';}""", , 2, 0;
If it doesn't run or you receive an error turn on stepping mode to help in determining what the problem is. Thanks.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: Freezing / lagging during thumbnail creation

Post by highend »

Ken, I didn't try that line but from the first look on it, are you sure that you aren't missing triple quotes in front of <xy>?
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

Hi highend, thanks I was just doing some experimenting. My Thumbnail Maintenance script has always used lines similar to the following. It uses run "cmd /c <xy>...". Now that's always worked for me and I suppose others, but maybe I should be triple quoting <xy> in the event of XYplorer in a path with spaces.

Code: Select all

 run "cmd /c <xy> /path=""$path"" /win=tray /new /script=""::if(replacelist(get('view'), '0|1|2|3|4|5|6|7|8|9', '302|303|304|305|306|307|308|309|313|314','|') != $thumb_cid){#$thumb_cid;#1001;}if($match){#501;}wait 50;#1001;if(get('instance')=='2'){exit 'n';}""", , 2, 0;
The line I was having m48tx try out doesn't use cmd /c.

Both cases work for me, but I have a feeling that maybe not for m48tx since his XYplorer is located in a Program files folder with spaces. As he stated in an earlier post on this thread, he always receives a file not found error. I wasn't sure if it's a cmd or XYplorer file not found error. So do you think I should be using the triple quotes for <xy>, even after cmd /c, everywhere in the script in the event of spaces in the XYplorer path? I'm actually surprised that more people wouldn't have seen an issue if they had XY in Program files folder with spaces. Thanks.

Edit: I receive a "Dubious syntax" error (syntax error checking on) if I use triple quotes around <xy> in either case with or without cmd /c.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

m48tx
Posts: 285
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx »

Thanks klownboy. I tried the line with my image path and the window flashes (as if it became the inactive window) but nothing else seems to happen. At least I am not getting scripting errors. I downgraded to 20.70 since 20.80.0500+ will not consistently refresh file operations. If I try background processing from 1.18, I still get the file not found scripting error.
Last edited by m48tx on 30 Mar 2020 04:58, edited 1 time in total.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

m48tx wrote: 28 Mar 2020 23:17 ...but nothing else seems to happen.
Well it could it be that it may seem that nothing happens because the work is being done in a 2nd instance of XYplorer (i.e., you should see an XY icon in the tray when the 2nd instance starts and the thumbnails are built in the path you specified). If it's a large folder with plenty of pics it may take a while. Make sure you specify a path with a good number of pics and specify a thumbnail size you may not normally use in that folder of pictures so it will be obvious that new thumbnails were actually built. For example, use 306 or 307 for small or medium thumb size if you normally would use large (308). In that script line, change these 2 places.. ...!= 307){#307.... When complete go to the specified path and use the the "Views" toolbar icon to change views to the new thumbnail size you specified. You should be able to tell if they are already built in the new size or not.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

m48tx
Posts: 285
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx »

I tried what you suggested, but the outcome is the same. The screen flashes, an XY icon flashes in the tray, then nothing else happens. I monitored task manager and there is only one instance of XY running and it is idle.
Last edited by m48tx on 30 Mar 2020 04:58, edited 1 time in total.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

Hi m48tx, the only thing I would suggest trying is running the code line without the "/win=tray" and simplified so you might see what's going on and to ensure it's not something else in the line causing an issue.

Code: Select all

   run "<xy> /path=""D:\your picture path\"" /new /script=""::#307;wait 1000;#1001;#501;wait 3000;#1001;if(get('instance')=='2') {exit 'n';}""", , 2, 1;
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

m48tx
Posts: 285
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx »

OK! Before I tested this, I did delete *all* files from my cache folder. I chose a folder with several thousand images, a 2nd instance of XY was created and thumbnails began to generate. I can navigate the system in instance 1. However, after creating all thumbnails, the thumbnails were created a 2nd time. It is essential to untick "Create all thumbnails at once" to prevent this. After creating thumbnails, the 2nd instance is closed and the thumbnails are available to instance 1.

I have to confess I was expecting something to happen that is not a function of this script line. I am so used to using your script to create thumbnails in all sub folders, I was expecting that to happen and that may have been why I thought nothing was happening when I started at a folder that contained only sub folders. I am going to go back and test your original script line with a folder that contains only images.

Update: I retested the original line you posted and it works perfectly. When I was using a base folder that contained only sub folders, the thumbnails were created for the sub folders so quickly that it appeared nothing was happening. As I said, I had the erroneous expectation the script line was going to descend into all subs. Again, thanks for all your work especially since I was providing incorrect feedback.

However, the 1.18 script fails with the scripting error I previously reported.
Last edited by m48tx on 30 Mar 2020 19:29, edited 2 times in total.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

m48tx wrote: 29 Mar 2020 17:02 However, after creating all thumbnails, the thumbnails were created a 2nd time.
Well, it seems we are making some progress anyway.

Yes, for that single line of code the thumbnails would be created once due to running ID #307. When the folder (which you had no thumbs) is entered and that CID is executed the thumbnails will be generated. They will be refreshed again (rebuilt) because of the CID #501 executed after that. The script takes some measures to minimize regeneration of thumbs by detecting if the folder has a saved folder view in that thumbnail view size, but in most cases you have to run CID #501 to ensure the folder's thumbs are completely rebuilt not just displayed or new thumbs added. My script makes sure Create all thumbnails at once is ON or it wouldn't be much of a thumbnail maintenance script.
m48tx wrote: 29 Mar 2020 17:02 the thumbnails were created for the sub folders so quickly that it appeared nothing was happening.
Yes, that's what I was worried might be happening if there were very few or not a significant amount of pictures in the folder. The single line of code was simply for one folder, the one pointed to in the path.
m48tx wrote: 29 Mar 2020 17:02 However, the 1.18 script fails with the scripting error I previously reported.
That scripting error previously reported is "The System can not find the file specified" error, right? Could you try putting "cmd /c" back in the line of code that worked for you to see if you get it.

Code: Select all

   run "cmd /c <xy> /path=""D:\your picture path\"" /new /script=""::#307;wait 1000;#1001;#501;wait 3000;#1001;if(get('instance')=='2') {exit 'n';}""", , 2, 1;
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

m48tx
Posts: 285
Joined: 07 May 2010 18:07

Re: Freezing / lagging during thumbnail creation

Post by m48tx »

When I used this text line, it failed. A message box flashes on the screen but I am unable to capture it nor read what it states. Can we assume it would be the file not found thing?

Update: I uninstalled XY from "C:\Program Files (x86)" and installed it in "C:\XYplorer" and the script line works. However, 1.18 Background Delete and Rebuild (folders and subs) still fails with same error message.
Last edited by m48tx on 30 Mar 2020 04:59, edited 1 time in total.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: Freezing / lagging during thumbnail creation

Post by klownboy »

m48tx wrote: 29 Mar 2020 18:59 I uninstalled XY from "C:\Program Files (x86)" and installed it in "C:\XYplorer" and the script line works.
I suppose that's telling us that the issue is the spaces in your path (when XYplorer was located in the Program files folder). The problem is: I've ran the code with """<xy>""" with and without using cmd and in both cases I receive a Dubious syntax error.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply