[Bioperl-l] SearchIO speed up

Sendu Bala bix at sendu.me.uk
Thu Aug 10 12:04:51 EDT 2006

Sean Davis wrote:
> On 8/10/06 11:19 AM, "Sendu Bala" <bix at sendu.me.uk> wrote:
>> ...Except I need to know if the community considers the speed problem
>> solved or not. More radical changes will make SearchIO even faster, eg.
>> Chris Fields and Jason (if I interpret the Project priority list item
>> correctly) have suggested an end to individual Hit and HSP objects,
>> which become just data members of a Result-like object. Ideally I don't
>> want to go down that route because we lose quite a bit of OO power; HSP
>> objects in particular make important use of inheritance and we'd end up
>> stuffing tens of duplicated-code methods into the Result object
>> replacement. Ugh. Or having the Result-like object implement 4 different
>> interfaces. Ugh. That said, judging by the results below, having hsps as
>> pure hashes would result in a ~5x speedup all the time instead of only a
>> 1.5x speedup in worst case.
> Just curious, but is there a possibility of making "lazy" instantiation of
> objects like HSP and HIT objects?  Things like parsing and output could be
> accomplished without these objects?

That's what I've done actually, which is why performance varies between 
5x and 1.5x (lower performance when the instantiation is forced).

But, things like 'parsing and output' do need to force the instantiation 
unless, say, an output module knew about the hash structure of the thing 
stored inside a Result object. Which is too horrible a situation to 
comprehend. :O

Or is it? What specifically did you have in mind?

More information about the Bioperl-l mailing list