[
https://issues.apache.org/jira/browse/TIKA-780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jukka Zitting resolved TIKA-780.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.1
Assignee: Jukka Zitting
With various refactorings I was able to significantly speed up the following
benchmark:
{code}
long a = System.nanoTime();
new Tika();
long b = System.nanoTime();
for (int i = 0; i < 100; i++) {
new Tika();
}
long c = System.nanoTime();
{code}
The average time between a and b (i.e. initial loading of the default
configuration) is down from 655ms to 377ms on my computer. It looks like any
further improvements would probably require precompiling the tika-mimetypes.xml
file to another format to avoid the XML parsing overhead. That's a topic for
another issue.
And thanks to the fact that the default media type registry is now memorized at
first load, the average time for creating a hundred more default Tika instances
went down from 4277ms to just 43ms!
> Optimize loading of the media type registry
> -------------------------------------------
>
> Key: TIKA-780
> URL: https://issues.apache.org/jira/browse/TIKA-780
> Project: Tika
> Issue Type: Improvement
> Components: mime
> Reporter: Jukka Zitting
> Assignee: Jukka Zitting
> Fix For: 1.1
>
>
> Parsing of our pretty large media type registry takes quite a while (hundreds
> of milliseconds), which can be a problem for some applications. There's a lot
> of ways in which we could optimize the loading of the type registry.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira