[
https://issues.apache.org/jira/browse/UIMA-3619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13902549#comment-13902549
]
Marshall Schor commented on UIMA-3619:
--------------------------------------
Change set: Revision: 1568695
> improve Cas FS to JCas cover instance map
> -----------------------------------------
>
> Key: UIMA-3619
> URL: https://issues.apache.org/jira/browse/UIMA-3619
> Project: UIMA
> Issue Type: Improvement
> Components: Core Java Framework
> Affects Versions: 2.5.0SDK
> Reporter: Marshall Schor
> Assignee: Marshall Schor
> Priority: Minor
> Fix For: 2.5.1SDK
>
>
> In highly parallel environments running on multiple cores, profiling shows
> that the JCas map has performance issues due to volatile and atomic
> operations that are unneeded, but happen due to the use of the built-in Java
> Random function (which uses volatile and atomic operations, internally). This
> map doesn't need to support multi-threading operations - it is always used in
> a single-thread manner. Other optimizations are possible, due to the limited
> way this table is used. One of the common cases is an iterator fetching an
> existing FS from the CAS, and needing to supply the corresponding JCas object
> (if it exists). This operation first looks up in the Map using the address
> as the key, and if not found, then makes the JCas object, and then adds it to
> the map - an operation which repeats the same lookup in order to find the
> "empty slot" where it can store the item. This extra lookup can be
> eliminated.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)