[ 
https://issues.apache.org/jira/browse/UIMA-5801?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16525122#comment-16525122
 ] 

Marshall Schor commented on UIMA-5801:
--------------------------------------

Looking at the code in the latest uimaFIT, it appears to **not** install a new 
UIMA Class loader if there's a UIMA Context available:


{code:java}
UimaContext activeContext = UimaContextHolder.getContext();
if (activeContext != null) {
// If we are already in a UIMA context, then we re-use it. Mind that the JCas 
cannot
// handle switching across more than one classloader.
// This can be done since UIMA 2.9.0 and starts being handled in uimaFIT 2.3.0
// See https://issues.apache.org/jira/browse/UIMA-5056
return ((UimaContextAdmin) activeContext).getResourceManager();
{code}
So, it looks like a workaround would be to a) switch to the lastest releases of 
uima 2 and uimaFIT, and then to figure out how to setup uima context that 
points to a shared / reused resource manager, and use this as part of the 
uimaFIT analysis engine creation.  [~rec] - is this possible with uimaFIT?

> Performance degradation of jCas.reset when repeatedly used in different 
> analysisEngines
> ---------------------------------------------------------------------------------------
>
>                 Key: UIMA-5801
>                 URL: https://issues.apache.org/jira/browse/UIMA-5801
>             Project: UIMA
>          Issue Type: Bug
>          Components: UIMA
>    Affects Versions: 2.1
>            Reporter: David Bürkle
>            Assignee: Marshall Schor
>            Priority: Major
>         Attachments: JCasPerformanceTest.java
>
>
> The execution time of jCas.reset() increases linearly when invoked on the 
> same jCas.
> This occurs in a loop that builds a new analysisEngine, processes the jCas 
> and resets it.
> This does not occur when the same analysisEngine is reused.
> A junit test demonstrating the behaviour is attatched.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to