[Biojava-l] Re: More Questions on behavior of SymbolList

Keith James kdj@sanger.ac.uk
06 Sep 2001 11:16:56 +0100


>>>>> "Thomas" == Thomas Down <td2@sanger.ac.uk> writes:

[...]

    Thomas> But if you do decide that subLists /shouldn't/ reflect
    Thomas> changes, I'd be slightly concerned about going down the
    Thomas> always-copy route, since subList is a very common
    Thomas> operation in some cases.  A better approach might be
    Thomas> `copy-on-write'.  Have an implementation which starts off
    Thomas> as a view on the parent sequence, but installs a
    Thomas> ChangeListener, and takes a full copy if it receives a
    Thomas> preChange notification?

We have 2 votes here for copy-on-write as we're going to be handling
lots of v. big sequences and potentially lots of subLists of each.

Keith

-- 

-= Keith James - kdj@sanger.ac.uk - http://www.sanger.ac.uk/Users/kdj =-
The Sanger Centre, Wellcome Trust Genome Campus, Hinxton, Cambs CB10 1SA