Community
Participate
Working Groups
During workspace startup, especially with large workspaces containing numerous projects, the IDependencyGraph may be slow with its initial computation. This slowness occurs because the IDependencyGraph is the first to force the load of each project's component model and is typically triggered when the EAR Libraries classpath container loads. This bugzilla enables the IDependencyGraph to restore its state based on the state stored in a previous workspace session and significantly reduces startup time spent computing the IDependencyGraph. Also, this completely eliminates blocked calls in DependencyGraphImpl.waitForAllUpdates() during startup which in the past has has been a significant deadlock risk (and still is, though not as much now, and will be even less with these changes). In conjunction on the above change, I am also investigating adding similar save/restore support for the EAR Libraries and Web App Libraries classpath containers. I will open a separate bugzilla for those changes when they are ready for review. Together these changes will dramatically improve startup time. The save is performed on a separate non blocking job which is reused such that if multiple changes are made consecutively, the file will only be saved once. This job is scheduled from the notification job after all notifications have been fired, so this will not alter the timing of graph updates. The restore is performed once at startup and several precautions have been made to avoid restoring a bad workspace. First, if the file does not exist, or is corrupted in any way the restore aborts and the graph is computed from scratch. Second, restore data is valid, first a quick check is made against the workspace to ensure all projects in the restore data are accessible; if any are not the restore aborts and the graph is computed from scratch. Finally, if the first two check pass, then the graph is completely restored, and a job is scheduled to double check the results. This job is scheduled immediately and ensures the restored graph is accurate; if any difference is observed, then the graph is recomputed from scratch.
Created attachment 183721 [details] patch
tested - worked for me... looks good
Code checked into 32M and HEAD for WTP 3.2.3 and 3.3