Fast processing of many images

Started by Archive, May 12, 2010, 08:54:25 AM

Previous topic - Next topic

Archive

[Originally posted by dpen on 2008-09-23 09:10:44-07]

Hi,

We are processing groups of images, some of them large groups. We are using exiftool on Windows/Mac and calling it as a command line from Java.

We are currently calling exiftool separately for each image and this is taking a lot of time. An experiment has shown that batching queries together makes it a lot faster, so we deduce that it is the loading and startup time for exiftool as a DOS command that is taking the time.

Unfortunately, the structure of the application and its UI makes it hard to batch queries in this manner.

Is there any way of speeding up the invocation of exiftool, for example by packaging it as a DLL under windows so that it doesn't have to be loaded each time?

Any help would be greatly appreciated.

David

Archive

[Originally posted by exiftool on 2008-09-23 11:23:38-07]

Hi David,

People have asked this before but I don't know how to package
exiftool as a DLL (if it is possible at all).  The best work-around
is to prepare the batch commands and execute them all together
in a single call to exiftool.  I have included the -execute
option with exactly this in mind.

- Phil

Archive

[Originally posted by dpen on 2008-09-23 12:23:16-07]

Phil,

Thanks for your prompt reponse. We will look at batching to solve this problem

David

Archive

[Originally posted by jamieh on 2008-09-30 08:54:33-07]

Hi Phil,

I am doing exactly what you describe and calling exiftool from my java program as a batch. I can confirm this is much faster than starting many seperate processes. The only problem I have found is that I do not get any real time output (i.e. what we would normally see on the console) when trying to read the stream from the process calling exiftool. Instead I get it all as a lump at the end (when processing is complete).

I have been doing some research and found this thread:

http://forums.sun.com/thread.jspa?threadID=368424&forumID=31" target="_blank">http://forums.sun.com/thread.jspa?threadID=368424&forumID=31

It appears that this problem is due to Perls default buffering output option, specifically:

autoflush HANDLE EXPR

$OUTPUT_AUTOFLUSH

$|

Is there any chance of building a windows exe version with this option set to a non zero value (which should allow me to get the output in real time).

Alternatively is it simple to build my own executable using the Perl wrapper (is there a guide to do this)?

Archive

[Originally posted by exiftool on 2008-09-30 10:51:14-07]

This is odd, because there are other people who can see the
output in real time.  (This is the purpose of the -v0
option, which is used by calling applications to show the
progress of a multi-file write operation.)

If you would do some testing to find a solution that works
for you, I will add it to the distributed code.  Just install
ActivePerl and use the pure Perl version of exiftool
(just add "perl " to the start of each command line).
Then you can test the autoflush settings to see what
fixes your problem.

Building the executable is not simple, so it would be best
to avoid this work if possible.

- Phil

Archive

[Originally posted by jamieh on 2008-09-30 11:29:33-07]

My apologies, I hadn't tried the -v0 option and can confirm that this does indeed give me the progress updates that I require

Many thanks for your excellent support and fantastic library!

Archive

[Originally posted by exiftool on 2008-09-30 12:18:06-07]

No need to apologize.  If my documentation were both readable and
comprehensive, you wouldn't have had this problem to begin with. https://exiftool.org/forum/Smileys/default/wink.gif" alt="Wink" border="0" />

- Phil