Friday, June 29, 2007
JHOVE performance note
Recently I noticed, in response to a user complaint about slow performance, that you can get huge performance improvements in JHOVE by disabling the HTML module in your configuration file. Because HTML is defined in such a way that a text file might be a valid HTML file if it just has a TITLE tag somewhere in it, it's necessary to parse the whole file before dismissing it, and this is painfully slow for multi-megabyte files.
If HTML files are in the mix of files you're analyzing, this may not be an option. In this case, you can still get a speed improvement by moving the HTML module lower in the config file (but still before ASCII and UTF-8), so that well-formed files of other formats won't incur the HTML module's overhead.