[Biococoa-dev] Caching the NSArray of BCSymbol

Alexander Griekspoor mek at mekentosj.com
Wed Jul 6 03:46:54 EDT 2005


I'm wondering to what extend we really need to cache the array of  
symbols, in fact when does one really need that array at all? Only if  
you ask a single position you get the symbol, in all other instances  
you don't want an array of symbols right, you want a BCSequence. So a  
subsequence -> a bcsequence is returned (again containing the char 
[]), the reverse of a BCSequence -> a bcsequence is returned etc...  
Want to display a sequence in a view -> the stringrepresentation of  
the bcsequence object is given. When would you like an array of symbols?
Alex

On 6-jul-2005, at 0:34, Charles Parnot wrote:

>> 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
>
>
>
> _______________________________________________
> Biococoa-dev mailing list
> Biococoa-dev at bioinformatics.org
> https://bioinformatics.org/mailman/listinfo/biococoa-dev
>
>

*********************************************************
                     ** Alexander Griekspoor **
*********************************************************
              The Netherlands Cancer Institute
              Department of Tumorbiology (H4)
         Plesmanlaan 121, 1066 CX, Amsterdam
                    Tel:  + 31 20 - 512 2023
                    Fax:  + 31 20 - 512 2029
                    AIM: mekentosj at mac.com
                    E-mail: a.griekspoor at nki.nl
                Web: http://www.mekentosj.com

       Microsoft is not the answer,
       Microsoft is the question,
       NO is the answer

*********************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.bioinformatics.org/pipermail/biococoa-dev/attachments/20050706/7d42e58f/attachment.html>


More information about the Biococoa-dev mailing list