Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 317820

Summary: Test Navigator Proxy Cache Improvement.
Product: z_Archived Reporter: Paul Slauenwhite <paulslau>
Component: TPTPAssignee: Bozier jerome <jerome.bozier>
Status: CLOSED WONTFIX QA Contact: Kathy Chan <kathy>
Severity: normal    
Priority: P2 CC: paulslau
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Screen capture. none

Description Paul Slauenwhite CLA 2010-06-24 09:44:37 EDT
Created attachment 172612 [details]
Screen capture.

Test Navigator Proxy Cache Improvement.

An improvement on the performance of Test Navigator operations (test asset export/refactoring) and UIs (Test Navigator and test asset selection dialogs) that require the dependencies between test assets (established during proxies creation) and/or proxies (required to determine the logical name of the test asset).  The current design creates the proxies on-demand (e.g. viewable in the UI).  However, this causes delays when creating a number of proxies.  For example, exporting test assets using the Export with Dependencies wizard causes a delay when populating the first page of the wizard (list of test asset to export) and the below screen capture shows a delay when creating the proxies after expanding a folder in the Test Navigator that contains 26 test suites (see attached screen capture).

The proposed solution is to start a background job when the Test Navigator (or the org.eclipse.hyades.test.ui plug-in, that contains the Test Navigator) is loaded/started that creates (new test assets) or loads (existing test assets - loaded from the serialized cache) the proxies into the proxy cache.  The same operation would run after operations creating new test assets (e.g. create, import, refactor, etc.).  As a result, the proxy operations/UIs are substantially more responsive.  However, this background job would consume more CPU (without impacting the RPT UI) and memory (all proxies held in memory - currently the case after an export/refactoring operation).

The proposed solution would include initializing all the
proxies in the workspace ONCE during Eclipse or Test Navigator (or the org.eclipse.hyades.test.ui plug-in, that contains the Test Navigator) start-up: 

//Start the Test Navigator initializer job:
Job testNavigatorInitializerJob = new Job("Test Navigator Initializer Job") {
//$NON-NLS-1$

  /* (non-Javadoc)
   * @see
org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
   */
  protected IStatus run(IProgressMonitor monitor) {

    try {     
TestUIUtilities.initializeProxyNodes(ResourcesPlugin.getWorkspace().getRoot(),
monitor);                    
    } 
    catch (OperationCanceledException o) {
      return (Status.CANCEL_STATUS);
    }

    return (Status.OK_STATUS);
  }
};

testNavigatorInitializerJob.setSystem(true);
testNavigatorInitializerJob.setPriority(Job.DECORATE);
testNavigatorInitializerJob.schedule(); 

See http://www.eclipse.org/articles/Article-Concurrency/jobs-api.html for more
information on background system jobs.

This is the same strategy used when updating referencing test assets after a
delete/paste/move refactoring operation.  However, this solution has its
disadvantages.  For example, CPU (initial cost from walking all of the
containers in the workspace) and memory (caching proxies for all test assets in
the workspace) usage.
Comment 1 Paul Slauenwhite CLA 2010-11-26 07:28:22 EST
Insufficient resources to complete.
Comment 2 Paul Slauenwhite CLA 2010-11-29 08:12:54 EST
Closing.