Eddie Epstein wrote:
On 5/15/07, Marshall Schor <[EMAIL PROTECTED]> wrote:
When Cas Views are made, another instance of CASImpl type is created,
and a great many of its fields are copied from the
base view.

How about an alternate design, which moves all of the fields being
copied into a new object that is shared by all CASImpls belonging to one
view?  This would "document" much more clearly which things are shared,
and which ones aren't, and open the possibility of convenient updating
of the shared things (should that be necessary) without iterating
through all views.

Any objects to my making this change while I'm mucking around for the
JCas updates and the ClassLoader switching support (for PEARs)?

-Marshall

The main things in CASImpl are:
 -various data heaps (FS heap, Strings, bytes, shorts and longs)
 -type system
 -index definitions
 -indexes themselves (one per view)

The heaps cannot be shared.
correct
The type system can already be shared. The
only big thing not currently sharable are the index definitions.
I'm not proposing to share these at this point.
It
might be possible to shared them, but the current IR design do not
separate definition from data, so the code that does the sharing of
the definitions between views is a bit complicated. May want to
re-implement the IR before doing that.
Not planning to do this...

Moving a common JCas object to the TS sounds like a good idea.

ok.

The kinds of things I'm thinking of sharing are the following:
       this.baseCAS
       this.ts
       this.sofa2indexMap
       this.sofa2tcasMap
       this.sofaNameSet
this.fsClassReg this.featureOffset
       this.fsSpaceReq
       this.creatableType
       all the Type instances for built-ins
       all the type codes for built-ins

Some of these shared things can be shared more widely - one per type system that's used by multiple CASes.

-Marshall

Reply via email to