Giovanni Cristelli created JRUBY-6352:
-----------------------------------------

             Summary: Slow startup of an executable jar created with warbler 
(rubygems problem ?)
                 Key: JRUBY-6352
                 URL: https://jira.codehaus.org/browse/JRUBY-6352
             Project: JRuby
          Issue Type: Bug
          Components: Performance
    Affects Versions: JRuby 1.6.5, JRuby 1.6.6
         Environment: Ubuntu 11.4 Linux  2.6.38 64bit
            Reporter: Giovanni Cristelli


I've found that changing only the jruby version (from 1.6.4 to 1.6.5 or 
1.6.6dev) and rebuilding the executable jar for my application using warbler 
1.3.3, the startup time for loading all required gems is 1.5x slower with 1.6.5 
and more than 6x times slower with 1.6.6dev (from 30 seconds with 1.6.4 to more 
than 2 minutes with 1.6.6).
The command used to execute the application is 
  {{java -jar myapp.jar}}
and I've tried other combinations for the -server/-client flag and 1.8/1.9 
compatibility mode, adding the options Djruby.memory.max=512m 
-Djruby.stack.max=2048k -Xmx512m -Xss2048k, but the results are more or less 
the same.

If I launch the application not using the jar but using the jruby command, the 
startup time is the same for all the 3 versions.
 
The application at startup requires many gems and I've tried to debug the 
problem enabling the option -Djruby.debug.loadService.timing and the result is 
that from a certain point requiring a gem is slower (the output in 1.6.4 is 
continuous while in 1.6.5/ 1.6.6 pauses for a while when a new require is 
executed).

In the debug output (with more than 1000 lines beginning with ->) for example, 
the require net/ldap timing is:
  

1.6.6dev:

{noformat}
      -> net/ldap
...
            <- bouncy-castle-java - 1634ms
                  <- jopenssl - 2024ms
                <- openssl.rb - 7830ms
              <- jruby/openssl/gem - 8856ms
            <- jruby/openssl/builtin - 9274ms
          <- jruby/openssl/stub - 9701ms
        <- openssl - 9701ms
          <- net/ber/core_ext - 2533ms
        <- net/ber - 2747ms
      <- net/ldap - 16639ms
{noformat}


1.6.5:

{noformat}
      -> net/ldap
...
                   <- bcprov-jdk15-146.jar - 1052ms
                  <- bouncy-castle-java - 1692ms
                  <- jopenssl - 2629ms
                <- openssl.rb - 4892ms
              <- jruby/openssl/gem - 4966ms
            <- jruby/openssl/builtin - 5007ms
          <- jruby/openssl/stub - 5072ms
        <- openssl - 5072ms
      <- net/ldap - 5642ms
{noformat}



1.6.4:

{noformat}
      -> net/ldap
...
                  <- bouncy-castle-java - 1694ms
                  <- jopenssl - 1663ms
                <- openssl.rb - 3560ms
              <- jruby/openssl/gem - 3591ms
            <- jruby/openssl/builtin - 3599ms
          <- jruby/openssl/stub - 3607ms
        <- openssl - 3607ms
      <- net/ldap - 3794ms
{noformat}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to