test:
[junit] Testsuite: org.jruby.test.MainTestSuite
[junit] Tests run: 147, Failures: 1, Errors: 0, Time elapsed: 16.083 sec
[junit] Testcase: testStringIO.rb(org.jruby.test.ScriptTestSuite$ScriptTest): FAILED
[junit] EXCEPTION raised 2 --
[junit] Exception: java.lang.StringIndexOutOfBoundsException : String index out of range: -2
[junit] java.lang.StringBuffer.substring(StringBuffer.java:801)
[junit] org.jruby.util.StringIOImpl.gets(StringIOImpl.java:69)
[junit] sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
[junit] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
)
[junit] java.lang.reflect.Method.invoke(Method.java:324)
[junit] org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:180)
[junit] org.jruby.javasupport.JavaMethod.invoke (JavaMethod.java:156)
[junit] sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source)
[junit] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
)
[junit] java.lang.reflect.Method.invoke(Method.java:324)
[junit] org.jruby.runtime.callback.ReflectionCallback.execute(ReflectionCallback.java:140)
[junit] org.jruby.internal.runtime.methods.CallbackMethod.internalCall (CallbackMethod.java:7
9)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod (RubyObject.java:308)
[junit] org.jruby.javasupport.JavaClass$1.execute(JavaClass.java:257)
[junit] org.jruby.internal.runtime.methods.CallbackMethod.internalCall(CallbackMethod.java:7
9)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$CallNodeVisitor.execute(EvaluateVisitor.java:555
)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.RubyObject.eval(RubyObject.java:440)
[junit] org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java :110
)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod (RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$CallNodeVisitor.execute(EvaluateVisitor.java:555
)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.evaluator.EvaluateVisitor.setupArgs(EvaluateVisitor.java:2831)
[junit] org.jruby.evaluator.EvaluateVisitor.access$3100 (EvaluateVisitor.java:171)
[junit] org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute(EvaluateVisitor.java:10
43)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java :262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.RubyObject.eval(RubyObject.java:440)
[junit] org.jruby.Ruby.loadScript(Ruby.java:828)
[junit] org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:50)
[junit] org.jruby.runtime.load.LoadService.load(LoadService.java:125)
[junit] org.jruby.RubyKernel.load(RubyKernel.java :599)
[junit] sun.reflect.GeneratedMethodAccessor370.invoke(Unknown Source)
[junit] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
)
[junit] java.lang.reflect.Method.invoke (Method.java:324)
[junit] org.jruby.runtime.callback.ReflectionCallback.execute(ReflectionCallback.java:140)
[junit] org.jruby.internal.runtime.methods.CallbackMethod.internalCall(CallbackMethod.java :7
9)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod (RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute(EvaluateVisitor.java:10
48)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.RubyObject.eval(RubyObject.java:440)
[junit] org.jruby.internal.runtime.methods.DefaultMethod.internalCall (DefaultMethod.java:110
)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod (RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute(EvaluateVisitor.java:10
48)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.Ruby.eval(Ruby.java:210)
[junit] org.jruby.Ruby.evalScript(Ruby.java:203)
[junit] org.jruby.test.ScriptTestSuite$ScriptTest.runTest(ScriptTestSuite.java:139)
[junit] junit.framework.TestCase.runBare(TestCase.java:127)
[junit] junit.framework.TestResult$1.protect(TestResult.java:106)
[junit] junit.framework.TestResult.runProtected(TestResult.java:124)
[junit] junit.framework.TestResult.run(TestResult.java:109)
[junit] junit.framework.TestCase.run(TestCase.java:118)
[junit] junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] junit.framework.TestSuite.run(TestSuite.java:203)
[junit] junit.framework.TestSuite.runTest(TestSuite.java:208)
[junit] junit.framework.TestSuite.run(TestSuite.java:203)
[junit] org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.jav
a:325)
[junit] org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main (JUnitTestRunner.ja
va:536)
[junit] C:\JRubyWork\jruby\src\lib\ruby\1.8\stringio.rb:53:in `gets'
[junit] C:\JRubyWork\jruby\src\lib\ruby\1.8\stringio.rb:53:in `gets'
[junit] test\testStringIO.rb:21
[junit] test/minirunit.rb:99:in `load'
[junit] test/minirunit.rb:99:in `test_load'
[junit] <script>:3
[junit] junit.framework.AssertionFailedError: EXCEPTION raised 2 --
[junit] Exception: java.lang.StringIndexOutOfBoundsException: String index out of range: -2
[junit] java.lang.StringBuffer.substring(StringBuffer.java:801)
[junit] org.jruby.util.StringIOImpl.gets (StringIOImpl.java:69)
[junit] sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[junit] sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[junit] sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25
)
[junit] org.jruby.javasupport.JavaMethod.invokeWithExceptionHandling(JavaMethod.java:180)
[junit] org.jruby.javasupport.JavaMethod.invoke(JavaMethod.java:156)
[junit] sun.reflect.GeneratedMethodAccessor318.invoke(Unknown Source)
[junit] sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25
)
[junit] org.jruby.runtime.callback.ReflectionCallback.execute (ReflectionCallback.java:140)
[junit] org.jruby.internal.runtime.methods.CallbackMethod.internalCall(CallbackMethod.java:7
9)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java :51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:308)
[junit] org.jruby.javasupport.JavaClass$1.execute(JavaClass.java :257)
[junit] org.jruby.internal.runtime.methods.CallbackMethod.internalCall(CallbackMethod.java:7
9)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$CallNodeVisitor.execute(EvaluateVisitor.java :555
)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.RubyObject.eval (RubyObject.java:440)
[junit] org.jruby.internal.runtime.methods.DefaultMethod.internalCall(DefaultMethod.java:110
)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java :51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$CallNodeVisitor.execute (EvaluateVisitor.java:555
)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.evaluator.EvaluateVisitor.setupArgs(EvaluateVisitor.java:2831)
[junit] org.jruby.evaluator.EvaluateVisitor.access$3100(EvaluateVisitor.java:171)
[junit] org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute (EvaluateVisitor.java:10
43)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.RubyObject.eval(RubyObject.java:440)
[junit] org.jruby.Ruby.loadScript(Ruby.java:828)
[junit] org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:50)
[junit] org.jruby.runtime.load.LoadService.load (LoadService.java:125)
[junit] org.jruby.RubyKernel.load(RubyKernel.java:599)
[junit] sun.reflect.GeneratedMethodAccessor370.invoke(Unknown Source)
[junit] sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:25
)
[junit] org.jruby.runtime.callback.ReflectionCallback.execute(ReflectionCallback.java:140)
[junit] org.jruby.internal.runtime.methods.CallbackMethod.internalCall (CallbackMethod.java:7
9)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod (RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute(EvaluateVisitor.java:10
48)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.RubyObject.eval(RubyObject.java:440)
[junit] org.jruby.internal.runtime.methods.DefaultMethod.internalCall (DefaultMethod.java:110
)
[junit] org.jruby.internal.runtime.methods.AbstractMethod.call(AbstractMethod.java:51)
[junit] org.jruby.RubyObject.callMethod(RubyObject.java:362)
[junit] org.jruby.RubyObject.callMethod (RubyObject.java:316)
[junit] org.jruby.evaluator.EvaluateVisitor$FCallNodeVisitor.execute(EvaluateVisitor.java:10
48)
[junit] org.jruby.evaluator.EvaluationState.executeNext(EvaluationState.java:262)
[junit] org.jruby.evaluator.EvaluationState.begin(EvaluationState.java:297)
[junit] org.jruby.Ruby.eval(Ruby.java:210)
[junit] org.jruby.Ruby.evalScript(Ruby.java:203)
[junit] org.jruby.test.ScriptTestSuite$ScriptTest.runTest(ScriptTestSuite.java:139)
[junit] C:\JRubyWork\jruby\src\lib\ruby\1.8\stringio.rb:53:in `gets'
[junit] C:\JRubyWork\jruby\src\lib\ruby\1.8\stringio.rb:53:in `gets'
[junit] test\testStringIO.rb:21
[junit] test/minirunit.rb:99:in `load'
[junit] test/minirunit.rb:99:in `test_load'
[junit] <script>:3
[junit] at org.jruby.test.ScriptTestSuite$ScriptTest.runTest (ScriptTestSuite.java:143)
On 6/8/06, Charles O Nutter <[EMAIL PROTECTED]> wrote:
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
--
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