Bug 94925 - [search] Bad performance on showing package selection dialog when creating new import group
Summary: [search] Bad performance on showing package selection dialog when creating ne...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.2 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2005-05-12 06:19 EDT by Tobias Widmer CLA
Modified: 2006-03-28 10:42 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tobias Widmer CLA 2005-05-12 06:19:58 EDT
I20050509-2010:

Steps to reproduce:
- Open Organize Imports preference page
- Create new import group
- Browse for packages

-> Takes several seconds to show the packages selection dialog. Even if the 
dialog is visible, packages are filled in.
-> Performance of computing the packages list could be improved
-> Dialog could be made visible earlier (to better report progress)
Comment 1 Martin Aeschlimann CLA 2005-05-13 05:02:40 EDT
The PackageSelectionDialog is used that is also use by the API on JavaUI.
Comment 2 Dirk Baeumer CLA 2005-06-08 16:35:17 EDT
The dialog uses the search engine to collect all packages. The call is:

SearchPattern pattern= SearchPattern.createPattern("*", //$NON-NLS-1$
	IJavaSearchConstants.PACKAGE, IJavaSearchConstants.DECLARATIONS,
	SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CASE_SENSITIVE);

Moving to JDT/Core. IMO not important for 3.1 since we hae this in since 1.0.
Comment 3 Frederic Fusier CLA 2005-06-09 03:12:10 EDT
Defer post 3.1
Comment 4 Frederic Fusier CLA 2005-08-05 04:04:44 EDT
Reopen for 3.2
Comment 5 Frederic Fusier CLA 2006-03-21 17:13:04 EST
Fixed and released in HEAD.

Changes done in MatchLocator.locatePackageDeclarations to avoid unnecessary instanciation of PossibleMatch objects.

No specific test case added, just verify that all existing tests pass. A new performance test will be added on FullSourceWorkspaceSearchTests soon. Initial measures on this new test show that gain is between 50% and 60% depending on test box (respectively Linux and WinXP).
Comment 6 Frederic Fusier CLA 2006-03-27 07:55:50 EST
FullSourceWorkspaceSearchTests#testSearchPackageDeclarations() test case added.
Our local performance tests results show a gain of 62.55% on Linux box and 68.17% on WinXP box.
Comment 7 Olivier Thomann CLA 2006-03-28 10:42:21 EST
Verified using I20060328-0010 for 3.2M6