buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <boisv...@intalio.com>
Subject Re: Http Download performance
Date Sun, 14 Jun 2009 21:38:38 GMT
I've seen this issue as well (100% cpu usage).  If we can narrow down the
affected platforms, maybe we can selectively enable it?

alex

On Sun, Jun 14, 2009 at 1:41 PM, Assaf Arkin <arkin@intalio.com> wrote:

> On Sun, Jun 14, 2009 at 9:33 AM, Ittay Dror <ittay.dror@gmail.com> wrote:
>
> > Hi
> >
> >
> > I recently had to deal with the performance of downloads in Buildr. What
> I
> > found is that Ruby's HTTP implementation used a fixed size for the buffer
> > size it used of 1024 bytes. This size creates means more calls to the OS
> and
> > so hurts performance.
> >
> >
> > The workaround I used is:
> >
> > module Net
> >  class BufferedIO
> >   def rbuf_fill
> >     timeout(@read_timeout) {
> >       @rbuf << @io.sysread(URI::RW_CHUNK_SIZE)
> >     }
> >   end
> >  end
> > end
> >
> >
> > It seems to decrease download time by half.
>
>
> Didn't make a difference for me. I think it's Ruby/OS dependent:
>
> https://issues.apache.org/jira/browse/BUILDR-167
>
> Assaf
>
>
> >
> >
> > HTH,
> >
> > Ittay
> >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message