I applied this locally and ran a local gem install, and it didn't speed things up appreciably. It looks like a good implementation though; I think we should proceed to making a 100% java version of this and other libraries. A quick profiling of the local install appears to be bogged down in interpretation; we just need to figure out what library is consuming all that time.

On 6/7/06, Ola Bini <[EMAIL PROTECTED]> wrote:
If it got lost, here are my StringIO backing class, and the new
StringIO-ruby-file for this. It can be reimplemented totally in Java
with minimal effort, but we could try this one first and see if it works.

If you want to, I could fix a new version later.

/O

----- Original Message -----
From: Thomas E Enebo <[EMAIL PROTECTED]>
Date: Wednesday, June 7, 2006 3:52 pm
Subject: Re: [Jruby-devel] Regarding slowness, again.
To: Thomas E Enebo <[EMAIL PROTECTED]>, jruby-devel@lists.sourceforge.net
Cc: [EMAIL PROTECTED]

> 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
> implementingsome of the stringio ops.
>
>  I will look more this evening...
>
> -Tom
>
> --
> + http://www.tc.umn.edu/~enebo +---- mailto:[EMAIL PROTECTED] ----+
> | Thomas E Enebo, Protagonist  | "Luck favors the prepared    |
> |                              |  mind." -Louis Pasteur       |
>
>
> _______________________________________________
> Jruby-devel mailing list
> Jruby-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jruby-devel
>




_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel






--
Charles Oliver Nutter @ headius.blogspot.com
JRuby Developer @ jruby.sourceforge.net
Application Architect @ www.ventera.com
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to