It is sysread.

-Tom

On Wed, 07 Jun 2006, Evan Buswell defenestrated me:

> If the call is read() (gets(), etc) rather than sysread() or recv(),
> then we are reading in up to 4k bytes at a time and buffering it.
> 
> Evan
> 
> Thomas E Enebo wrote:
> > On Tue, 06 Jun 2006, Thomas E Enebo defenestrated me:
> >   
> >> On Tue, 06 Jun 2006, Ola Bini defenestrated me:
> >>     
> >>> I did a simple runhprof on JRuby while doing gem install rake, which
> >>> first downloads the 3.5mb gemspec and then the 76kb Rake-gem.
> >>> The result was this: as far as I can understand this, it seems we're
> >>> blocking really, really, really much.
> >>> (That throwable is ONE InterruptedException, by the way... So that isn't
> >>> cheap either)
> >>>
> >>> Well, enjoy. I'm going to bed! =)
> >>>       
> >>   Thanks for this,  I did notice something was amiss and figured it
> >> was only blocking initially...It looks like it may be much more than that.
> >> Something to dig into...perhaps gems install times will rival ruby by the
> >> end of this week... :)
> >>     
> >
> >   I have not figured this out yet, but I will say that the number of
> > read calls may or may not be as Ruby wants.  net/http will read in
> > 1024 bytes at a time from the network.  This number seems low to me
> > it is not even a full MTU.  So we honor this and also only read in
> > 1k at a time.  If the gem you were installed was large, then you will
> > see many many reads happening.   We can probably be more aggressive 
> > internally, but I am not sure how much this will help yet.
> >
> >   So I wrote a simple test which uses net/http the same way as gems
> > and I put some prints everytime we called sysread in RubyBasicSocket.
> > Those come out at a decent clip and then stop for quite a while before
> > finishing.  What returns appears to be one stringio object.  I am 
> > wondering if we are seeing the same thing that we saw before when
> > we had RubyString backed by a String and not a StringBuffer.  I do
> > have plans to rewrite StringIO in java, but not in the next couple
> > of days.  If it is some super slow string concat string thing then
> > we may be able to get some time back by examining how we are implementing
> > some of the stringio ops.
> >
> >   I will look more this evening...
> >
> > -Tom
> >
> >   
> 
> 
> 
> _______________________________________________
> Jruby-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jruby-devel

-- 
+ http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
| Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
|                              |  mind." -Louis Pasteur       |


_______________________________________________
Jruby-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to