From: Alec W. <al...@br...> - 2010-09-28 12:08:55
|
Hi Wolf, I must confess that I don't ever use BAM over HTTP, except when running unit tests. Jim Robinson has been our primary client (and author) for that functionality, and as he seems satisfied with it I haven't looked at it very hard. I just added a ctor for SeekableBufferedStream in which you can pass in whatever buffer size you like. If you want to use a different buffer size, you can replace code like this: new SAMFileReader(url, indexFile, eagerDecode) with this: new SAMFileReader(new SeekableBufferedStream(new SeekableHTTPStream(url), yourDesiredBufferSize), indexFile, eagerDecode) Let me know how it goes. -Alec On 9/28/10 7:00 AM, Asraniel wrote: > i searched a little more and i found the source of my problem to be the buffer > size: > > public class SeekableBufferedStream extends SeekableStream { > > private int bufferSize = 512000; > > this means that the constructor will at any case download 512kb. there is > probably no reason for that. i was able to get the constructor time to 2 > seconds by changing this value to 1000. There are probably better values. > > So, what was the exact reasoning behind this value? > > thank you > > Beat Wolf > > Am Dienstag 28 September 2010, um 11.29:11 schrieb Asraniel: > >> hi, >> >> i'm playing around with loading bam files over http. What i noticed is that >> it is quite slow. slower than it should be. >> To give some numbers: >> Constructor of SAMFileReader for a local bamfile is nearly 0 >> Same but for a http bam file> 14 seconds. >> >> the bam file is quite small, so i would expect it to be much faster. >> >> I was wondering if there are any plans to optimize this? >> >> thank you >> >> Beat Wolf >> > > ------------------------------------------------------------------------------ > Start uncovering the many advantages of virtual appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing. > http://p.sf.net/sfu/novell-sfdev2dev > _______________________________________________ > Samtools-devel mailing list > Sam...@li... > https://lists.sourceforge.net/lists/listinfo/samtools-devel > |