调整包含大量文件的文件夹中的图像时,GraphicsMagick会变慢(+ 80k)

时间:2016-07-19 19:01:52

标签: windows performance graphicsmagick disk-io

我注意到当我尝试调整驻留在超过80k其他图像(相同级别没有子目录)的文件夹中的图像时,调整大小可能需要将近2秒。 (1.92s)

然而,在只有10张其他图像的文件夹中,相同的图像几乎是即时的(0.02秒)。

  • 我正在batch模式下对此进行测试,因为我的应用正在使用gm4java:1.1.0
  • 在Windows 10上运行
  • NTFS(I thought this could be an issue,运行contig.exe,但没有变化)
  • GraphicsMagick 1.3.21

以下是我的命令和输出:

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

我无法在SO或sourceforge上找到有关此内容的任何内容。有什么想法为什么它这么慢?

1 个答案:

答案 0 :(得分:0)

我应该先试试这个。结果更新到最新的GraphicsMagick 1.3.24解决了这个问题。

调整同一图像的大小,无论同一文件夹中有多少其他文件,现在都需要相同的时间。

查看release notes of 1.3.22这可能已修复它,因为在目录中提到了很多文件(我找不到确切的提交):

  

概述:修复了子图像路径提取时的性能问题   目录中有很多文件。