| Summary: | JRE_CONTAINER optimization in JdtToBeBuiltComputer | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Modeling] TMF | Reporter: | Vladimir Piskarev <vpiskarov> | ||||
| Component: | Xtext | Assignee: | Project Inbox <tmf.xtext-inbox> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | sebastian.zarnekow, sven.efftinge | ||||
| Version: | 2.0.0 | Flags: | sven.efftinge:
indigo+
|
||||
| Target Milestone: | SR2 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 201905 [details]
Proposed patch
Any chance to get it included in SR2? The fix is trivial, but may provide a performance increase. Thanks for the patch, Vladimir. I modified it slightly to use JavaRuntime.newDefaultJREContainerPath().isPrefixOf(classpathEntry.getPath()) instead of a plain string comparison. Pushed to master. Thanks for fixing it in a much cleaner way, Sebastian. Closing all bugs that were set to RESOLVED before Neon.0 Closing all bugs that were set to RESOLVED before Neon.0 |
Build Identifier: I20110613-1736 JdtToBeBuiltComputer tries to optimize away costly traversing of JRE_CONTAINER. Unfortunately, the current implementation based on equality with 'org.eclipse.jdt.launching.JRE_CONTAINER' does not always work. The raw classpath entry for JRE_CONTAINER can just as well look as 'org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6' , in which case the optimization is not working, which can slow down things considerably. Similar implementation is also used in JavaProjectsStateHelper. A fix may look as root.getRawClasspathEntry().getPath().toString().startsWith("org.eclipse.jdt.launching.JRE_CONTAINER"). Reproducible: Always Steps to Reproduce: Make a full build of an Xtext Java project configured with a Java execution environment (e.g. JavaSE-1.6).