I noticed that when I try to resize an image that resides in a folder with over 80k other images (same level no sub directories) the resize can take almost 2 seconds. (1.92s)
Yet, the same image, in a folder with only 10 other images, is almost instant (0.02s).
- I'm testing this in
batch
mode, since my app is usinggm4java:1.1.0
. - Running on windows 10
- NTFS (I thought this could be an issue, ran contig.exe, but no change)
- GraphicsMagick 1.3.21
Here are my commands and outputs:
GM> benchmark convert -size 200x200 "C:\lots-of-pics\image399.png[0]" -auto-orient -thumbnail 200x200 "C:\Users\user\AppData\Local\Temp\img-4518761374990603981.png"
Results: 1 threads 1 iter 1.94s user 1.94s total 0.514 iter/s 0.516 iter/cpu
GM> benchmark convert -size 200x200 "C:\less-pics\image399.png[0]" -auto-orient -thumbnail 200x200 "C:\Users\user\AppData\Local\Temp\img-4518761374990603981.png"
Results: 1 threads 1 iter 0.02s user 0.02s total 58.823 iter/s 64.000 iter/cpu
I wasn't able to find anything about this on SO or sourceforge. Any ideas why it's so much slower?
chkdsk
?). Otherwise, the library you use must behave differently if there are lots of files next to the one given it to convert - you'll have to investigate that, with a profiler, Sysinternals Process Monitor or via a number of other possible approaches. – cynicimg-nnnnnnnn.png
? – Mark Setchell