On Friday 07 April 2006 10:55 am, Thomas E Enebo wrote:
> On Fri, 07 Apr 2006, Ola Bini defenestrated me:
> > Hi.
> >
> > Well, as you can see, this part has nothing to do with Syck either. It is
> > not the speed of YAML-parsing that's the issue (at least not yet... =),
> > but the speed of this particular
> > code fragment.
>
>   Bummer, I was hoping the each in yaml_spec was one culprit.  I realize
> now that it is just a gigantic mult-line string.  No yaml at all.
>
> > So, to recap, the method reduce_spec is in remote_installer.rb in
> > RubyGems, and it's not a YAML-issue yet. Probably it's a combination of
> > many regexps and substitutions that's doing it slow.
>
>   Those regexps should not be slow in Java since they are all rooted
> to front and back of line.  Also they all are only working on a single
> line at a time.  Though I think we are constantly reconstructing them
> and maybe that is the slow part?

We are, and it might be the problem.  Java compilation of regexs is not well 
optimized.  But even worse, for every regex we get, we apply about 6 more 
regexes to 'translate' it to Java be compatible.  I did once try to cache 
them, but it's not as simple to get right as you'd like it to be.

>   I will take a look this weekend a bit too just to get a handle on this.
> This particular code seems pretty isolated (as in it could make a good
> test case on a large data set -- good benchmark perhaps?).
>
> -Tom


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
Jruby-devel mailing list
Jruby-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jruby-devel

Reply via email to