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! =)

rank   self  accum   count trace method
   1 94.41% 94.41%   68169   528 sun.nio.ch.SocketDispatcher.read0
   2  1.32% 95.73%     954   525 sun.nio.ch.Net.connect
   3  0.33% 96.06%     236   800 java.lang.Throwable.fillInStackTrace
   4  0.24% 96.30%     175   704 java.io.FileInputStream.open
   5  0.16% 96.46%     116  1025 java.lang.Thread.yield
   6  0.15% 96.61%     107   633 java.util.ArrayList.<init>
   7  0.15% 96.75%     105   632 java.util.ArrayList.<init>
   8  0.11% 96.86%      78   607 org.jruby.evaluator.EvaluationState.<init>
   9  0.10% 96.96%      72   626 org.jruby.evaluator.EvaluationState.<init>
  10  0.09% 97.05%      63   718 org.jruby.runtime.ThreadContext.pushFrame
  11  0.08% 97.13%      61   706 org.jruby.runtime.Frame.<init>
  12  0.08% 97.21%      57   799 java.lang.Thread.yield
  13  0.08% 97.29%      55   516
org.jruby.evaluator.EvaluationState.addInstruction
  14  0.07% 97.36%      52   817 java.util.ArrayList.<init>
  15  0.07% 97.43%      47   617
java.lang.ThreadLocal$ThreadLocalMap.access$000
  16  0.06% 97.48%      42   723 org.jruby.runtime.ThreadContext.pushFrame
  17  0.06% 97.54%      41   832 java.util.AbstractList.iterator
  18  0.05% 97.59%      37   622
org.jruby.evaluator.EvaluateVisitor.setupArgs
  19  0.05% 97.64%      34   610 java.lang.System.arraycopy
  20  0.04% 97.68%      32   614 java.util.AbstractList.iterator
  21  0.04% 97.73%      32   624
org.jruby.evaluator.EvaluateVisitor.setupArgs
  22  0.04% 97.77%      30   616 java.util.ArrayList.<init>
  23  0.04% 97.81%      30  1003 java.io.FileInputStream.readBytes
  24  0.04% 97.85%      26   823
org.jruby.evaluator.EvaluateVisitor$NewlineNodeVisitor.execute
  25  0.03% 97.88%      22   402 sun.reflect.Reflection.getClassAccessFlags
  26  0.03% 97.91%      22   814
org.jruby.evaluator.EvaluateVisitor$NewlineNodeVisitor.execute
  27  0.03% 97.94%      21   349
java.io.WinNTFileSystem.getBooleanAttributes
  28  0.03% 97.97%      21   761 java.io.RandomAccessFile.close0
  29  0.02% 97.99%      18   843
org.jruby.evaluator.EvaluationState.addInstruction
  30  0.02% 98.01%      16   885 org.jruby.runtime.ThreadContext.pushFrame
  31  0.02% 98.03%      16   837 java.lang.Object.hashCode
  32  0.02% 98.06%      16   345
java.io.WinNTFileSystem.getBooleanAttributes
  33  0.02% 98.08%      15   535 java.io.RandomAccessFile.read
  34  0.02% 98.10%      14   825 org.jruby.runtime.Frame.<init>
  35  0.02% 98.12%      13   621 java.util.HashMap.addEntry
  36  0.02% 98.13%      12   833
org.jruby.evaluator.EvaluationState.addInstruction
  37  0.02% 98.15%      12   714 java.lang.Throwable.fillInStackTrace
  38  0.02% 98.16%      12   635 org.jruby.runtime.ThreadContext.pushFrame
  39  0.02% 98.18%      11   753 org.jruby.RubyModule.retrieveMethod
  40  0.02% 98.20%      11   713 java.lang.Throwable.fillInStackTrace
  41  0.02% 98.21%      11   365 java.util.zip.ZipFile.getEntry
  42  0.01% 98.22%      10   760 java.io.RandomAccessFile.writeBytes
  43  0.01% 98.24%      10   903 org.jruby.evaluator.EvaluationState.<init>
  44  0.01% 98.25%      10   701 java.io.WinNTFileSystem.getLength
  45  0.01% 98.27%      10   875
org.jruby.evaluator.EvaluationState.executeNext
  46  0.01% 98.28%      10   807
org.jruby.internal.runtime.methods.DefaultMethod.prepareArguments
  47  0.01% 98.29%       9  1032 org.jruby.RubyObject.callMethod
  48  0.01% 98.30%       9   629 org.jruby.runtime.ObjectSpace.add
  49  0.01% 98.32%       9   978
org.jruby.internal.runtime.methods.ReflectedMethod.internalCall
  50  0.01% 98.33%       9   385 java.util.zip.ZipFile.getEntry
  51  0.01% 98.34%       8   860 java.util.AbstractList.listIterator
  52  0.01% 98.35%       8   716 org.jruby.RubyFixnum.newFixnum
  53  0.01% 98.36%       8   623 org.jruby.RubyThread.pollThreadEvents
  54  0.01% 98.37%       8   882 org.jruby.runtime.Frame.newScope
  55  0.01% 98.39%       8  1207 org.jruby.RubyArray.newArray
  56  0.01% 98.40%       8   897 org.jruby.runtime.ObjectSpace.add
  57  0.01% 98.41%       8   847
org.jruby.runtime.ThreadContext.pushDynamicVars
  58  0.01% 98.42%       8   828 java.util.ArrayList.<init>
  59  0.01% 98.43%       8   741 java.util.HashMap.hash
  60  0.01% 98.44%       8   362
org.jruby.runtime.ThreadContext.getBlockArgs
  61  0.01% 98.45%       8   824 java.util.ArrayList.get
  62  0.01% 98.46%       8   928 org.jruby.RubyModule.retrieveMethod
  63  0.01% 98.47%       8   842 org.jruby.RubyArray.newArray
CPU SAMPLES END



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

Reply via email to