tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jukka Zitting" <jukka.zitt...@gmail.com>
Subject Re: Providing a Default Tika Configuration
Date Tue, 25 Sep 2007 08:30:28 GMT

On 9/25/07, Bertrand Delacretaz <bdelacretaz@apache.org> wrote:
> On 9/25/07, kbennett <kbennett@bbsinc.biz> wrote:
> > ...We could also make one default configuration per thread using
> > threadlocal to avoid the overhead of synchronization, but I've heard that
> > synchronization is not as slow as it used to be, so that might be overkill....
> Yes, compared to what happens next (parsing of possibly large files),
> one synchronized block won't matter much!

On the other hand, compared to that I'd just as well just recreate the
full config instance. Using a static variable, synchronization, etc.
sounds too complex to me.

How about something like this:

    public static TikaConfig getDefaultConfig()
            throws IOException, JDOMException {
        return new TikaConfig(


Jukka Zitting

View raw message