Mfarooq360 / WinThumbsPreloader-V2

WinThumbsPreloader is a powerful open source tool for quickly preloading thumbnails in Windows Explorer.
MIT License
72 stars 1 forks source link

No multi threading? #10

Open Kieaer opened 7 months ago

Kieaer commented 7 months ago

There's no speed difference between operating single-threaded in the original version and multi-threaded in the this version.

I tried loading 800 avif files. Why is this program showing in Task Manager between 38 and 233 threads, but CPU usage is less than 5% and no speed difference?

VL4DST3R commented 7 months ago

Unless something broke for avif files, I would imagine there should be no difference. Are only those affected?

How are you running the jobs? Bat script? Via the UI?

Also are you running it on a HDD? It may very well be a bottleneck somewhere else.

Kieaer commented 7 months ago

@VL4DST3R Running on SSD (nvme), I tried preload button in GUI I'm not tried cli, will test later.

VL4DST3R commented 7 months ago

There are a few beta versions here of V2, can you try the very first one published and see if it acts the same? It should realistically be the closest to the original version implementation-wise, which you said works as intended.

Kieaer commented 7 months ago

@VL4DST3R I used CLI in beta-1 version and really faster (CPU over 80%) Maybe it's just me, but CLI didn't work in beta-4. keep popup GUI. I used WinThumbsPreloader -r -m <path> command.

VL4DST3R commented 7 months ago

No need to @ me, I get notified either way.

If the ui popus up most likely there was a typo in the command, most often the path having spaces and being provided without quotes.

I can confirm that the CLI does indeed work on all versions as that's exclusively how i run them on my PC.

Also on b4 some issues with special characters in target paths that I've reported in b2 and b3 were fixed, so if you're still encountering issues could you give an example of the path you're trying to generate for?

moxin3 commented 7 months ago

There's no speed difference between operating single-threaded in the original version and multi-threaded in the this version.

I tried loading 800 avif files. Why is this program showing in Task Manager between 38 and 233 threads, but CPU usage is less than 5% and no speed difference?

How many number of threads you have mentioned in setting

Kieaer commented 7 months ago

@VL4DST3R Path contains non-ANSI characters. E:\브챗\2024.1.1

@moxin3 image

moxin3 commented 7 months ago

@VL4DST3R Path contains non-ANSI characters. E:\브챗\2024.1.1

@moxin3 image

Use as Admin it wil resolve speed issue also tick preload folder icons

VL4DST3R commented 7 months ago

Maybe it's just me, but CLI didn't work in beta-4. keep popup GUI.

Path contains non-ANSI characters.

Well then there we go, there may still be some issues with those. Mutahar will have to take a look and check for path issues with those, until then also try what @moxin3 suggested, or use the older version that still had (hopefully) proper handling for those. Maybe try b2 as well- check the changelogs to see what changed feature-wise.

also tick preload folder icons

Speaking of, do we have a flag for that as well for command-line @Mfarooq360 ?

Mfarooq360 commented 7 months ago

Maybe it's just me, but CLI didn't work in beta-4. keep popup GUI.

Path contains non-ANSI characters.

Well then there we go, there may still be some issues with those. Mutahar will have to take a look and check for path issues with those, until then also try what @moxin3 suggested, or use the older version that still had (hopefully) proper handling for those. Maybe try b2 as well- check the changelogs to see what changed feature-wise.

I renamed a folder to contain those characters using the command line argument: winthumbspreloader -m -r "C:\Users\mutah\Pictures\브챗 2024.1.1"

and it did launch the B4 preloader as well as for inserting the path without quotes winthumbspreloader -m -r C:\Users\mutah\Pictures\브챗 2024.1.1

It also seems to work with the preload button, so I'm not sure if its bad arguments being used or something else.

also tick preload folder icons

Speaking of, do we have a flag for that as well for command-line @Mfarooq360 ?

I currently don't have a flag for it as the setting for toggling it also has the option of changing whether to do so for specific folders containing files with set extensions or all folders, which would make it more tied to something like customizing the extensions, which it may rely on.

VL4DST3R commented 7 months ago

I currently don't have a flag for it as the setting for toggling it also has the option of changing whether to do so for specific folders containing files with set extensions or all folders, which would make it more tied to something like customizing the extensions, which it may rely on.

This explains why I would no longer get folder gens on newer versions, I didn't know this got removed from CLI. As for the settings: something that uses the currently selected/default list of files the tool provides should certainly be re-added, as until the ability to provide (multiple) folders directly in the UI gets added, people like me won't be able to generate them at all.

Mfarooq360 commented 7 months ago

I currently don't have a flag for it as the setting for toggling it also has the option of changing whether to do so for specific folders containing files with set extensions or all folders, which would make it more tied to something like customizing the extensions, which it may rely on.

This explains why I would no longer get folder gens on newer versions, I didn't know this got removed from CLI. As for the settings: something that uses the currently selected/default list of files the tool provides should certainly be re-added, as until the ability to provide (multiple) folders directly in the UI gets added, people like me won't be able to generate them at all.

Folder generation should still work in the CLI, it just needs to be enabled in the GUI first and in the advanced settings, it can preload specific or all folders.

I'm also currently working on the Bulk Preloader form and trying to add drag and drop functionality to the About form.

VL4DST3R commented 7 months ago

Folder generation should still work in the CLI, it just needs to be enabled in the GUI first and in the advanced settings, it can preload specific or all folders.

Gotcha, will do that. Thanks!

Kieaer commented 7 months ago

image image Beta-2 version is working

VL4DST3R commented 7 months ago

Interesting. In newer versions a limit was introduced as there is a yet unidentified case where if the thumbnail database gets accessed too often, it may lock up and crash, causing it to reset and effectively loose all cached thumbs. @Mfarooq360 how does the limit work exactly in newer versions? Could it be over-zealous for this user?

moxin3 commented 7 months ago

My crashes have stopped since i changed storage sense settings, no more database gets deleted IMG-2024-01-27- 1 IMG-2024-01-27- 2

Mfarooq360 commented 7 months ago

Interesting. In newer versions a limit was introduced as there is a yet unidentified case where if the thumbnail database gets accessed too often, it may lock up and crash, causing it to reset and effectively loose all cached thumbs. @Mfarooq360 how does the limit work exactly in newer versions? Could it be over-zealous for this user?

I checked the code differences between versions and it seems like the thread limiter hasn't changed since beta 2, I'll be doing some testing to find out where the issue is occurring in the code as I haven't encountered this problem before.

Kieaer commented 7 months ago

I tried a few test. If i try an avif that is not preloaded, it will run at less than 5% CPU usage, and it will also be slow. However, if i try it on an already preloaded avif, the CPU usage will be 100% and the process will be super fast.

It seems that the avif loading time is inevitably slow with the current CPU (Ryzen 9 5900x). image

It seems not bug, windows or cpu limit

Mfarooq360 commented 7 months ago

I tried a few test. If i try an avif that is not preloaded, it will run at less than 5% CPU usage, and it will also be slow. However, if i try it on an already preloaded avif, the CPU usage will be 100% and the process will be super fast.

While the avif preloading shouldn't be that slow for non-preloaded thumbnails, when they are preloaded the cpu usage being higher comes from being able to look through the cache for the thumbnails a lot quicker, which is normal. It seems that the avif loading time is inevitably slow with the current CPU (Ryzen 9 5900x). image

It seems not bug, windows or cpu limit

I'm thinking that the slow avif file loading might be due to using icaros to get the thumbnails for avif files, have you tried preloading the thumbnails with the windows av1 extension after removing the avif option from icaros?

Kieaer commented 7 months ago

I'm thinking that the slow avif file loading might be due to using icaros to get the thumbnails for avif files, have you tried preloading the thumbnails with the windows av1 extension after removing the avif option from icaros?

Only video files are set in icaros, but I deleted them for testing and tried again, processing is really faster but avif thumbnails are not created. probably a windows bug

moxin3 commented 7 months ago

@Mfarooq360 is there any Beta-5 comming soon or stable version of V2?

Mfarooq360 commented 7 months ago

@Mfarooq360 is there any Beta-5 comming soon or stable version of V2?

I'm currently working on Beta-5 and we're finding a bunch of new issues so the stable release may be pushed back further to make sure the program is fully stable. I still have a few new features and a lot of bug fixes to add to the next few betas.

moxin3 commented 7 months ago

@Mfarooq360 is there any Beta-5 comming soon or stable version of V2?

I'm currently working on Beta-5 and we're finding a bunch of new issues so the stable release may be pushed back further to make sure the program is fully stable. I still have a few new features and a lot of bug fixes to add to the next few betas.

Looking forward and excited for Beta 5