[Bioperl-l] SearchIO speed up
bix at sendu.me.uk
Mon Aug 14 09:04:19 EDT 2006
aaron.j.mackey at gsk.com wrote:
> A "pull parser" need not read everything (i.e. the entire file) into
> memory, just the current/next chunk, right?
The problem arises when you need random-access to the input data in
order to do what you need to do, like get just the next chunk or bit of
So I don't see a way for a generalized pull-parser to cope with piped
input, because most operations are going to have use seek() to work, and
you can't seek piped input.
What I do at the moment, then, is on detecting piped input, I'm forced
to read all the input data in in one go and spit it out into seekable
memory or a temp file. After which normal behaviour resumes - you don't
read everything, just the bit you want.
More information about the Bioperl-l