: It is invoking a COM object in Windows. The object is instantiated once for : a token stream, and then invoked once for each token. The invoke always has : an overhead, not much to do about that (sigh...)
I also know nothing about COM, but based on your comments it sounds like instantiating your COM object is expensive ... so why to it for every token? why not have a TokenFilter where the COM object is constructed when the TokenFilter is constructed, and then the same object will be invoked for each token in the stream for a given field value. Or better still: if your COM object is threadsafe, construct one in the init method for your TokenFilterFactory and reuse it in every TokenFilter instance. -Hoss