[jbosstools-issues] [JBoss JIRA] (JBIDE-15398) CDI Builder is sloooow

Viacheslav Kabanovich (JIRA) jira-events at lists.jboss.org
Wed Sep 4 20:02:03 EDT 2013


    [ https://issues.jboss.org/browse/JBIDE-15398?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12801755#comment-12801755 ] 

Viacheslav Kabanovich commented on JBIDE-15398:
-----------------------------------------------

My first suspect was lack of memory, and stack traces attached prove that VM wastes too much time on simple checks in JDT. Screen from memory analyser shows that Maven and JDT are responsible for most memory used. CDI needs memory too, and when it is deficient, VM works quite slow.

I started new workspace with 2Gb and could not import all projects at the first attempt, I got OutOfMemoryException long before Java and CDI build started. Killing Eclipse couple of times, and deleting/imporing partly configured projects again, I managed to get to Java build at last. After that CDI build was performed in about 20 minutes, even while in severe want of memory. 

Then I looked into what code takes most time during the build. Amazingly, it turned to be just two auxiliary methods:

CDICoreNature.getAllAnnotations()
DefinitionContext.getAnnotation(String)

that took 15 minutes out of 20.

There are a lot of dependences in Wildfly workspace, and each project lists all projects on which it depends. When iterating over such project dependencies, these two methods showed almost factorial growth of time on the depth of the dependency graph. 

                
> CDI Builder is sloooow
> ----------------------
>
>                 Key: JBIDE-15398
>                 URL: https://issues.jboss.org/browse/JBIDE-15398
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: cdi
>    Affects Versions: 4.1.0.Final
>         Environment: Thinkpad T510, Windows 7-64, default JBDS 7.0.0.GA settings, jdk1.7.0_25
>            Reporter: Fred Bricon
>            Assignee: Viacheslav Kabanovich
>            Priority: Critical
>             Fix For: 4.2.x
>
>         Attachments: cdi-build-1.txt, cdi-build-2.txt, cdi-build-3.txt, MemoryUsedOnWildflyBuild.png
>
>
> After cloning https://github.com/wildfly/wildfly, if you import all 130 projects as Maven projects, the CDI nature is automatically added via an m2e configurator.
> 52 minutes after the import, the workspace is currently building at 81% and counting. Random jstack calls show most of the time is spent in the CDI Builder, as shown on the progress bar.
> If I import the same projects in Luna (haven't tried on an clean KeplerEE distro yet) without CDI support (and admittedly the builk of JBT), import+build complete in ~12/13 min

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


More information about the jbosstools-issues mailing list