On 5/14/07, Marshall Schor <[EMAIL PROTECTED]> wrote:
I don't think there is a significant performance savings.  So I'm
willing to go with the following
(let's see if I get this right...)

Changes:
1) 1 map from CAS objects to JCas cover objects, shared by all views
2) The getters from the iterators would *update* the _Type ref to be the
view associated with the iterator
      * this might be implemented by changing the generators, using
reflection, or not - TBD
3) addto/removeFrom indexes for subtypes of Annotation_base use the sofa
ptr to get the right view.

These are not changed:
4) There is a set of _Type objects, one per view

Please let me know if I've overlooked something
-Marshall


JCas objects are broken if an FS instance can belong to multiple
views, because 1) addToIndexes() is ambiguous and 2) hashed JCas
instances are not shared across views. The suggestions above do not
fix the situation for all scenarios, for example, situations where a
JCas object is retrieved from a reference.

Given that there is no complicated approach that always works, a
simpler approach is called for: just have one set of xxx_Type objects,
deprecate addToIndexes() and always map it to the current view.

Eddie

Reply via email to