[Biococoa-dev] Caching the NSArray of BCSymbol
Charles Parnot
charles.parnot at gmail.com
Tue Jul 5 18:34:56 EDT 2005
> One question about design of this: should we think about a caching
> policy?
> Maybe have a boolean ivar that allows a sequence to retain its
> symbol array
> at an app developer's discretion (defaults to NO, but can be
> manually set to
> YES in cases where an app developer knows he'll need repeated
> access to
> individual symbols). It would let app developers make performance vs.
> memory decisions, instead of leaving them at the framework level.
>
> JT
>
I thought of that too initially, but more recently I thought:
* if the sequence is immutable, the developer could cache it outside
of the framework, no need to do it in the framework
* if the sequence is mutable, caching means a lot of additional code
to keep the array in sync for all the methods where the sequence
changes; which probably means we should not do it now, but leave it
for the future *if* the need arises.
Or the developer could be smart and know better than use NSArray when
performance is needed ;-)
charles
--
Xgrid-at-Stanford
Help science move fast forward:
http://cmgm.stanford.edu/~cparnot/xgrid-stanford
Charles Parnot
charles.parnot at gmail.com
More information about the Biococoa-dev
mailing list