Bug 7616 - Unnecessary indexing when project is opened
Summary: Unnecessary indexing when project is opened
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P2 normal (vote)
Target Milestone: 2.0 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 7441 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-01-15 11:30 EST by Jerome Lanneluc CLA
Modified: 2002-01-18 07:58 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2002-01-15 11:30:29 EST
Build 20020109

When a project is opened, all its libraries are requested to be indexed.
This is unnecessary and should be done only when the library is added.
Comment 1 Philipe Mulet CLA 2002-01-16 09:02:33 EST
Also look at 7441 which is a related issue. When switching JREs, all projects 
might references to rt.jar will be reindexed... we should also optimize this 
scenario (if taking out the library indexing from project opening). But then 
how do we deal with case where a non empty project is added from CVS at once. 
Its libraries must be detected as well for triggering indexing
Comment 2 Philipe Mulet CLA 2002-01-16 09:04:56 EST
*** Bug 7441 has been marked as a duplicate of this bug. ***
Comment 3 Jerome Lanneluc CLA 2002-01-17 06:52:09 EST
Removed indexing during JavaProject.openWhenClosed(...) and added it in the 
SetClasspathOperation.

Also added mechanism to queue the index request on startup (during the check 
index constency) and when a variable is updated (when switching JRE). The queue 
is a HashSet, thus if a request is added twice, it will be run only once.
Comment 4 Jerome Lanneluc CLA 2002-01-18 07:58:04 EST
Improved the mechanism to eliminate duplicates: when an index request is added 
to the job manager's queue, check if it is already there (with the same 
modification timestamp for the underlying resource). Thus the extra queue (i.e. 
the HasSet) is not needed any longer. Removed it.