[Bioperl-l] Speeding Up File Access

Jason Stajich jason at cgt.duhs.duke.edu
Tue Apr 13 22:03:34 EDT 2004

Hey Johnny -

You can just pass in an already built filehandle to Root::IO

my $fh;
open($fh, '< :raw', $filename) || die $!;
my $seqio = Bio::SeqIO->new(-fh => $fh, -format => 'fasta');

I'd be curious to see some benchmarking results if this makes a
difference if you're up to running a few tests?


On Sat, 10 Apr 2004, Johnny Amos wrote:

> Hello,
> There was a recent article at PerlMonks.org about speeding up file IO:
> http://www.perlmonks.org/index.pl?node_id=344087
> One thing that caught my attention was the use of the :raw pragma on
> filehandle creation to explicitly prevent handling of Unicode text.  In the
> example given this cut file IO times in half for a 3 GB file.
> open (FH, '< :raw', $filename);
> instead of just:
> open (FH, '<', $filename);
> I tried to look at Bio::Root::IO to see if an option for using this (or an
> equivalent) was already implemented, but couldn't see one.
> Is this something worth submitting a patch for?  Would it be useful for
> things like UniGene, LocusLink, BLAT, and Blast parsers or can these files
> contain Unicode in them somehow?
> Johnny
> _________________________________________________________________
> Free up your inbox with MSN Hotmail Extra Storage! Multiple plans available.
> http://join.msn.com/?pgmarket=en-us&page=hotmail/es2&ST=1/go/onm00200362ave/direct/01/
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l

Jason Stajich
Duke University
jason at cgt.mc.duke.edu

More information about the Bioperl-l mailing list