Summary: | Regression in performance test FullSourceWorkspaceModelTests#testFindType | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Frederic Fusier <frederic_fusier> | ||||
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | philippe_mulet | ||||
Version: | 3.4 | Keywords: | performance, test | ||||
Target Milestone: | 3.4 M7 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Frederic Fusier
2008-03-27 08:42:31 EDT
The regression comes from the last change done to fix bug 222339 in PackageFragmentRoot.internalKind() method. The first released method implementation was: int internalKind() throws JavaModelException { JavaModelManager manager = JavaModelManager.getJavaModelManager(); PackageFragmentRootInfo info = (PackageFragmentRootInfo) manager.peekAtInfo(this); if (info == null) { // default to regular getKind() return getKind(); } return info.getRootKind(); } And this was changed to: int internalKind() throws JavaModelException { JavaModelManager manager = JavaModelManager.getJavaModelManager(); PackageFragmentRootInfo info = (PackageFragmentRootInfo) manager.peekAtInfo(this); if (info == null) { info = (PackageFragmentRootInfo) openWhenClosed(createElementInfo(), null); } return info.getRootKind(); } Revert this change seems to bring back the previous performance results. Created attachment 94527 [details]
Proposed fix
The version with getKind() was faster because it is optimized out in JarPackageFragmentRoot and it always returns K_BINARY. The fix consists in doing the same optimization for internalKind().
Fix released for 3.4M7 The regression is visible on the download site (see detailed performance results for 3.4 M6 - from the download page for 3.4 M6, follow 'View the performance results for the current build.', 'org.eclipse.jdt.core*', scroll down to 'FullSourceWorkspaceModelTests#testFindType()'). Frédéric had access to the results for I20080427-2000, and the regression is gone. Hence, Verified for 3.4 M7 using build I20080427-2000. Bright green confirmed on the download page for build I20080427-2000. |