Bug 306944

Summary: [indexing] JSPIndexManager needs to revert change to start off initial index after initializing
Product: [WebTools] WTP Source Editing Reporter: Ian Tewksbury <itewksbu>
Component: jst.jspAssignee: Ian Tewksbury <itewksbu>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: nsand.dev
Version: 3.2Keywords: performance
Target Milestone: 3.2 M7Flags: nsand.dev: review+
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Patch to remove intial rebuildIndex call nsand.dev: iplog+

Description Ian Tewksbury CLA 2010-03-24 10:40:58 EDT
In Bug 291659 a change was put in to start a index rebuild as the last step in initializing the JSPIndexManager.  This was done in order to fix issues with the index not being ready when the user invoked Java refactoring or searching.  In my testing this changed seemed to fix this issue, but Nick has been able to reproduce cases where this still did not fix the problem.  Further more an adopter product has discovered that if a user has a large workspace then it can take upwards of 20 minutes to perform this indexing and in the process is pegging the CPU and memory usage.  Further more one would assume that while this maybe a one time expensive cost if the user then closes  the workspace after the indexing finished and then opens it again the long running CPU pegging indexing occurs AGAIN.

I believe that this initial index should be removed for the time being and a more in-depth investigation needs to take place into the JSPIndexManager and how it can be improved both in efficiency and allowing operations like Search and Refactor to be able to wait for the index to to finish building before executing (which they currently cant, as well as discover why files that have already been indexed need to be re-indexed when the workspace is re-loaded for Java search and re-factor to work.

Patch to follow.
Comment 1 Ian Tewksbury CLA 2010-03-24 10:42:22 EDT
Created attachment 162865 [details]
Patch to remove intial rebuildIndex call

Patch as discussed in bug description.
Comment 2 Nick Sandonato CLA 2010-04-05 15:14:52 EDT
As much as it saddens me, the performance hit is too severe to let it go live like this. We cannot rebuild the index like this at every startup. Please continue to investigate the reason the indices are not correct on workspace startup.