You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by "Marshall Schor (JIRA)" <de...@uima.apache.org> on 2014/10/21 23:20:35 UTC

[jira] [Commented] (UIMA-4059) add-to-indexes and checking for incorrect key modifications

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

Marshall Schor commented on UIMA-4059:
--------------------------------------

The tracking of which FSs are added/removed to/from indices needs to be "per view", since it's perfectly OK to add the same FS to multiple views (if it is not a subtype of AnnotatorBase).  The testing of feature modifications has to check if the FS is indexed in any view - a potentially more expensive operation.  The overheads involved in add/remove to/from index are such that the additional check probably is too small to measure, but the overhead for testing if a FS is in any index for every setting of Feature Values that are in keys might be excessive.  Since the most common pattern is to set several features for a new FS at once, it may pay to have a one-element cache of the last FS that was found to not be in any index, or to have this check be separately omittable (like Java asserts - you could turn it on if you have some issue like unexpected index behavior.)

> add-to-indexes and checking for incorrect key modifications
> -----------------------------------------------------------
>
>                 Key: UIMA-4059
>                 URL: https://issues.apache.org/jira/browse/UIMA-4059
>             Project: UIMA
>          Issue Type: Improvement
>          Components: Core Java Framework
>    Affects Versions: 2.6.0SDK
>            Reporter: Marshall Schor
>            Assignee: Marshall Schor
>            Priority: Minor
>             Fix For: 2.6.1SDK
>
>
> Address the issue raised in Jiras UIMA-3399 and UIMA-4049, as follows: Add (under control of a Java jvm defined param - for backwards compatibility in unexpected edge cases, or if it is determined this has too big a performance/space cost) a set which tracks if a FS has been added/removed-to/from-the-indexes that has fast O(1) access. Change behavior of add-to-indexes when a FS has already been added to not add it again. Change behavior of feature structure value setting to throw an exception if the feature being set is used as a key in any index, and the FS has been added-to-the-indexes.
> This should address issues raised in both JIRAs.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)