[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:
ar ../common/libs/runtime-nojee6container/javax.inject.jar ../common/
weld-se.jar ../common/libs/runtime-nojee6container/weld-servlet.jar .
.0.jar ../common/libs/runtime/google-collect-1.0.jar ../common/libs/r
.jar ../common/libs/runtime/httpclient/httpcore-nio-4.0.1.jar ../comm
C2.jar ../common/libs/runtime/json/jackson-core-asl-1.4.3.jar ../comm
jar ../common/libs/runtime/truezip-6.jar ../common/target/jars/plain/
r ../product/api/target/jars/plain/myapplication-api.jar ../product/c
> 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