Slow thumbnails
-
- Site Admin
- Posts: 60604
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Slow thumbnails
Sorry for that! I don't know why I didn't have the idea earlier, well, maybe to grant you that learning experience. It should not be much work, I'll give it a shot today.
FAQ | XY News RSS | XY Twitter
Re: Slow thumbnails
great!admin wrote:UPDATE: Yep, bug found and fixed!
-
- Site Admin
- Posts: 60604
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Slow thumbnails
Thank you! That was a really important bug. The fix will save the climate by sparing lots of unnecessary CPU action.kileytoo wrote:great!admin wrote:UPDATE: Yep, bug found and fixed!
FAQ | XY News RSS | XY Twitter
Re: Slow thumbnails
I don't know what you found and fixed on beta v18.70.0001, but XY ts doing a great job now on updating the thumbnail cache files on folder moves. So much so that it's making it hard to test the script for updating the cache. I've been making moves like "e:\temp\two\" to "g:\main\\two\" and the caches are updating automatically. It probably means I'll have to move the folder outside of XY (i.e., in Windows Explorer) to test the script or your new SC ThumbsCacheRename.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
Re: Slow thumbnails
Hi highend, I incorporated Don's update to SC formatdate in the script which writes a new dat2 file based on the folder change. It appears to be to working fine in my own script. I was hoping you'd take a look to make sure I didn't screw something up. Here is a modified version of what you provided. I wasn't too positive about trailing backspaces you mention. The hex dump of $VBdate (8 bytes) has a trailing backspace so I didn't add it in that line. I assume I needed the hexdump of $VBdate since the rest of the line is in hex format. I used a $VBdate start postion of 8 bytes from 277-284 with the remainder of the file, $footerDat2File starting at 285. This seems to be working though. When I enter the image folder after it's use the thumbnail are not regenerated.
To test, I accomplished the folder moves outside of XYplorer using Explorer to ensure XY wasn't automatically updating the cache file. Thanks.
To test, I accomplished the folder moves outside of XYplorer using Explorer to ensure XY wasn't automatically updating the cache file. Thanks.
Code: Select all
$srcFileContent = readfile($srcFile, "r");
$hexSrcFileContent = hexdump($srcFileContent, 1, "r"); // Has trailing space
$headerSrcFile = gettoken($hexSrcFileContent, 16, , , 1); // No trailing space
// $footerSrcFile = gettoken($hexSrcFileContent, 277, , , 2); // Has trailing space
$footerSrcFile = gettoken($hexSrcFileContent, 285, , , 2); // Has trailing space
$VBdate = hexdump(formatdate(, "8char"),,"r"); // Has trainling space.
$newPath = "R:\a new folder where items are stored\*96x72";
$hexNewPath = hexdump($newPath, , "r"); // Has trailing space
$cntHexNewPath = gettoken(trim($hexNewPath), "count");
$toPad = 276 - $cntHexNewPath - gettoken($headerSrcFile, "count");
// $hexDstFileContent = $headerSrcFile . " " . trim($hexNewPath) . strrepeat(" 20", $toPad) . " " . $footerSrcFile;
$hexDstFileContent = $headerDat2File . " " . trim($hexNewPathThumb) . strrepeat(" 20", $toPad) . " " . $VBdate . $footerDat2File;
writefile($dstFile, hexdump($hexDstFileContent, 1, "ri"), , "r");
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
Re: Slow thumbnails
Well yes, I think what highend did originally here viewtopic.php?f=5&t=13863&start=30#p155570 is build the sections of the dat2 file in hex format.All those sections are in hex format and then in the next step it is converted with "ri" parameter. There's probably an easier way to accomplish it especially since you've provided the VBdate in the exact format necessary.I'll try it without the hexdump conversions (and see if it still works )
Code: Select all
$hexDstFileContent = $headerSrcFile . " " . trim($hexNewPath) . strrepeat(" 20", $toPad) . " " . $footerSrcFile;
Code: Select all
writefile($dstFile, hexdump($hexDstFileContent, 1, "ri"), , "r");
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440
-
- Site Admin
- Posts: 60604
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Slow thumbnails
Hex values are a representation of bytes, they almost never appear literally in any files. What you want to write to the file are the bytes, not the representation.
FAQ | XY News RSS | XY Twitter
Re: Slow thumbnails
Just to add that USBDLM is now working fine also on the Windows 8.1 tablet, not sure what the issue was but it was short-lived.
I will soon need to look into the maintenance scripts for thumbnails to keep the cache size under control. Is there an official thread or download page?
I was also wondering how the option to cache thumbnails on removable media behaves when running XYplorer from a removable media? I planned to do some testing but haven't found the time yet.
I will soon need to look into the maintenance scripts for thumbnails to keep the cache size under control. Is there an official thread or download page?
I was also wondering how the option to cache thumbnails on removable media behaves when running XYplorer from a removable media? I planned to do some testing but haven't found the time yet.
Re: Slow thumbnails
Not official, but you could see if this fits your needs:kileytoo wrote:I will soon need to look into the maintenance scripts for thumbnails to keep the cache size under control. Is there an official thread or download page?
viewtopic.php?f=7&t=12257
Same as usual, they will be created in your Thumbnails folder wherever you have that location set to via:kileytoo wrote:I was also wondering how the option to cache thumbnails on removable media behaves when running XYplorer from a removable media? I planned to do some testing but haven't found the time yet.
Configuration | Preview | Thumbnails | Cache thumbnails on disk
Re: Slow thumbnails
Thanks!
Sorry I should have been more specific. I am running portable installs of XYplorer on removable media with this option ON along with standard installs on local discs with this option OFF and all is good. However, the wording of this option seems to be intended for XYplorer running from a standard installation on a local disk, which makes me wonder: if I turn it off on the portable install, will it still create thumbs for the media it is running from, because it sees it as local, or not? I assume it won't create thumbs for other removable media. Also, will it consider the system/desktop drives as local, and create thumbs there regardless of this option? If so, ideally I would want to be able to turn off creating thumbs on the desktop drives...jupe wrote: Same as usual, they will be created in your Thumbnails folder wherever you have that location set
Re: Slow thumbnails
The location you are running XY from is irrelevant, settings that apply to fixed drives or removable drives will do the same thing whether you are running it from c:\ or from a removable drive.
ie. If running XY from a removal drive it doesn't mean that image files on the same drive become local, they should only be created if "Cache Thumbnails to Disk" and "Include Removable Media" is ticked.
ie. If running XY from a removal drive it doesn't mean that image files on the same drive become local, they should only be created if "Cache Thumbnails to Disk" and "Include Removable Media" is ticked.
Re: Slow thumbnails
That's simple enough! Maybe including local disks should be made optional (checked by default), it could be useful when running the program from a removable media.
-
- Site Admin
- Posts: 60604
- Joined: 22 May 2004 16:48
- Location: Win8.1 @100%, Win10 @100%
- Contact:
Re: Slow thumbnails
Why wouldn't you want to cache thumbs on local disks? ... OK, when you are using XY portably on an alien system, right?kileytoo wrote:That's simple enough! Maybe including local disks should be made optional (checked by default), it could be useful when running the program from a removable media.
FAQ | XY News RSS | XY Twitter