ImageMagick slows down over time while processing a large batch of images?
Posted: 2019-01-15T14:22:26-07:00
Hello
I don't know if this is the right place but I'm having a similar issue with Magick running in windows batch file. The batch file starts at great speed, then after about 600 images starts to slow down. I notice that the processor usage also goes down, and from my understanding its happening the same to me. Diferent computers on test same issue.
I don't know if this is the right place but I'm having a similar issue with Magick running in windows batch file. The batch file starts at great speed, then after about 600 images starts to slow down. I notice that the processor usage also goes down, and from my understanding its happening the same to me. Diferent computers on test same issue.
Code: Select all
pushd \\192.168.0.191\csd01_op595_storage_b\01-MICROFILM\21_EXPORTAR\21_EXPORTAR_7750WW-21\LB0012\110_1_0081_110_1980_1980_2
set /a counter=0
set zero=000
set nomeimg=0000
setlocal ENABLEDELAYEDEXPANSION
FOR /R %%a in (*.tif) DO (
set /a counter=counter+1
set countercalc=!counter!
if /i !counter! GTR 9 set zero=00
if /i !counter! GTR 99 set zero=0
if /i !counter! GTR 999 set zero=
set nomeimg=!zero!!counter!
echo ------------------------------------------------------------------
echo Contador : counter=!counter!
ECHO Processing file: "%%~nxa"
ECHO Processing file: "%%~na"
magick -monitor -quiet %%a -background black -bordercolor black -border 10x10 -fuzz 40%% -trim -resample 300x300 +repage -compress lzw -format tif -compress lzw -format tif %cd:~0,2%\01-MICROFILM\30_TIF_ENTREGA\LB0012\110_1_0081_110_1980_1980_2\!nomeimg!.tif
echo %%a;!nomeimg!.tif;!DATE!;!TIME! >> %cd:~0,2%\01-MICROFILM\30_TIF_ENTREGA\LB0012\110_1_0081_110_1980_1980_2\LOG.txt
echo Imagem Processada %%a;!nomeimg!.TIF;!DATE!;!TIME!
magick -monitor -quiet %%a -background black -resample 120x120 +repage -bordercolor black -border 10x10 -deskew 80%% -fuzz 40%% -trim +repage -compress jpeg -quality 50 -format PDF %cd:~0,2%\01-MICROFILM\31_PDF_ENTREGA\LB0012\110_1_0081_110_1980_1980_2\!nomeimg!.pdf
echo %%a;!nomeimg!.tif;!DATE!;!TIME! >> %cd:~0,2%\01-MICROFILM\31_PDF_ENTREGA\LB0012\110_1_0081_110_1980_1980_2\LOG.txt
echo Imagem Processada %%a;!nomeimg!.PDF;!DATE!;!TIME!
)