[weld-issues] [JBoss JIRA] Commented: (WELD-522) Weld makes my Java SE app startup time >100x slower

Morten Christensen (JIRA) jira-events at lists.jboss.org
Sun May 9 14:40:05 EDT 2010

    [ https://jira.jboss.org/jira/browse/WELD-522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12529766#action_12529766 ] 

Morten Christensen commented on WELD-522:

No, I do not do anything special with injection in loops or something like that. My setup is pretty simple. I only have singletons + one application scoped object and I don't have providers etc yet as far as I recall.... I BUT as I said the classpath is pretty involved, so I suspect that weld spends quite some time going through all of them (which I would like weld NOT to do - if I could only disable this)...Here is a spec from a shell jar I created:

Class-Path: ../common/libs/runtime-nojee6container/grizzly-webserver-1
 .9.18-k.jar ../common/libs/runtime-nojee6container/javax.annotation.j
 ar ../common/libs/runtime-nojee6container/javax.inject.jar ../common/
 libs/runtime-nojee6container/javax.servlet.jar ../common/libs/runtime
 -nojee6container/jersey-bundle-1.1.5.jar ../common/libs/runtime-nojee
 6container/jsr311-api-1.1.jar ../common/libs/runtime-nojee6container/
 weld-se.jar ../common/libs/runtime-nojee6container/weld-servlet.jar .
 ./common/libs/runtime/apache-mime4j-0.6.jar ../common/libs/runtime/ar
 gs4j-2.0.12.jar ../common/libs/runtime/commons/commons-codec-1.4.jar 
 ../common/libs/runtime/commons/commons-logging-1.1.1.jar ../common/li
 bs/runtime/commons/commons-net-2.0.jar ../common/libs/runtime/commons
 /commons-net-ftp-2.0.jar ../common/libs/runtime/commons/commons-vfs-1
 .0.jar ../common/libs/runtime/google-collect-1.0.jar ../common/libs/r
 untime/groovy/groovy-all-1.6.3.jar ../common/libs/runtime/httpclient/
 httpclient-4.0.1.jar ../common/libs/runtime/httpclient/httpcore-4.0.1
 .jar ../common/libs/runtime/httpclient/httpcore-nio-4.0.1.jar ../comm
 on/libs/runtime/httpclient/httpmime-4.0.1.jar ../common/libs/runtime/
 javascript/js.jar ../common/libs/runtime/jruby/jruby-complete-1.5.0.R
 C2.jar ../common/libs/runtime/json/jackson-core-asl-1.4.3.jar ../comm
 on/libs/runtime/json/jackson-jaxrs-1.4.3.jar ../common/libs/runtime/j
 son/jackson-xc-1.4.3.jar ../common/libs/runtime/json/jettison-1.2.jar
  ../common/libs/runtime/rapa-0.9.jar ../common/libs/runtime/scala/jer
 sey-scala-1.1.5.jar ../common/libs/runtime/scala/scala-library-2.7.5.
 jar ../common/libs/runtime/truezip-6.jar ../common/target/jars/plain/
 myapplication-common.jar ../pluginmodules/ftp/libs/runtime/edtftpj.ja
 r ../product/api/target/jars/plain/myapplication-api.jar ../product/c
 ore/target/jars/plain/myapplication-core.jar ../product/ws/target/jar

> Weld makes my Java SE app startup time >100x slower 
> ----------------------------------------------------
>                 Key: WELD-522
>                 URL: https://jira.jboss.org/jira/browse/WELD-522
>             Project: Weld
>          Issue Type: Bug
>    Affects Versions: 1.0.1.Final
>         Environment: Java 6, Weld 1.01 SE + lots of jars on the classpath
>            Reporter: Morten Christensen
> Booting my Java SE app without weld takes << 1s BUT the 1 line for initializing weld to autowire my app takes at least 4-5 seconds. 
> My app is not so big and consist of ~20-30 singletons that must be wired + various other non-weld stuff. I have lots of stuff on my classpath so I suspect that could be why weld is going crazy. 
> I guess this could be improved if I can have weld limited to work only inside my own jar and/or only work with specific classes/packages.
> P.S. With breakpoints enabled in a debugger and a bit of unluck, I was even able to have welds initialization to take ~ 5 minutes one day (reduced to seconds again after I removed all breakpoints though).

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the weld-issues mailing list