Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow Java Searches #338

Closed
mpiggott opened this issue Sep 11, 2017 · 2 comments
Closed

Slow Java Searches #338

mpiggott opened this issue Sep 11, 2017 · 2 comments

Comments

@mpiggott
Copy link

I've noticed with recent Groovy Eclipse plugin installed attempting to find references takes an extraordinary amount of time (currently over 20-minutes). A thread dump shows setting the groovy classpath as the issue:

"Worker-65" #626 prio=1 os_prio=-2 tid=0x000000001ea62000 nid=0x2e14 runnable [0x00000000599ad000]
   java.lang.Thread.State: RUNNABLE
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:327)
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:321)
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:321)
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:321)
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:321)
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:321)
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:321)
        at org.eclipse.jdt.core.util.CompilerUtils.computeDependenciesFromProject(CompilerUtils.java:321)
        at org.eclipse.jdt.core.util.CompilerUtils.calculateClasspath(CompilerUtils.java:252)
        at org.eclipse.jdt.core.util.CompilerUtils.setGroovyClasspath(CompilerUtils.java:152)
        at org.eclipse.jdt.core.util.CompilerUtils.setGroovyClasspath(CompilerUtils.java:129)
        at org.eclipse.jdt.core.util.CompilerUtils.configureOptionsBasedOnNature(CompilerUtils.java:62)
        at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:190)
        at org.codehaus.jdt.groovy.model.GroovyCompilationUnit.buildStructure(GroovyCompilationUnit.java:311)
        at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:259)
        at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:107)
        at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:583)
        at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:317)
        at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:303)
        at org.eclipse.jdt.internal.core.JavaElement.exists(JavaElement.java:221)
        at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitImports(TypeInferencingVisitorWithRequestor.java:582)
        at org.eclipse.jdt.groovy.search.TypeInferencingVisitorWithRequestor.visitCompilationUnit(TypeInferencingVisitorWithRequestor.java:351)
        at org.codehaus.jdt.groovy.integration.internal.GroovyLanguageSupport.maybePerformDelegatedSearch(GroovyLanguageSupport.java:198)
        at org.codehaus.jdt.groovy.integration.LanguageSupportFactory.maybePerformDelegatedSearch(LanguageSupportFactory.java:114)
        at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1237)
        at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1359)
        at org.eclipse.jdt.internal.core.search.matching.MatchLocator.locateMatches(MatchLocator.java:1476)
        at org.eclipse.jdt.internal.core.search.JavaSearchParticipant.locateMatches(JavaSearchParticipant.java:122)
        at org.eclipse.jdt.internal.core.search.BasicSearchEngine.findMatches(BasicSearchEngine.java:236)
        at org.eclipse.jdt.internal.core.search.BasicSearchEngine.search(BasicSearchEngine.java:583)
        at org.eclipse.jdt.core.search.SearchEngine.search(SearchEngine.java:608)
        at org.eclipse.jdt.internal.ui.search.JavaSearchQuery.run(JavaSearchQuery.java:175)
        at org.eclipse.search2.internal.ui.InternalSearchUI$InternalSearchJob.run(InternalSearchUI.java:92)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:56)

@eric-milles
Copy link
Member

If you open your Console view and then use the new console drop-down (upper right corner) to open the Groovy Event Console, can you run the same thing and see what output goes there? Are there any errors in your log (see Error Log view)?

@mpiggott
Copy link
Author

If you open your Console view and then use the new console drop-down (upper right corner) to open the Groovy Event Console, can you run the same thing and see what output goes there? Are there any errors in your log (see Error Log view)?

I haven't been able to reproduce this since, perhaps my workspace was in an odd compilation state? I did later run into a similarly long (40+ minutes) to compute a hierarchy, though thread dumps didn't show Groovy classes when I took them.

Still seems like a bad idea to potentially recompile in the midst of other jobs though I'm not sure how much of that is controllable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants