Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 249587 - Datapool (CSV) import wizard is slow to open when large datapools in the workspace.
Summary: Datapool (CSV) import wizard is slow to open when large datapools in the work...
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: TPTP (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 major (vote)
Target Milestone: ---   Edit
Assignee: Paul Slauenwhite CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 249588
  Show dependency tree
 
Reported: 2008-10-03 07:00 EDT by Paul Slauenwhite CLA
Modified: 2016-05-05 10:29 EDT (History)
2 users (show)

See Also:
jerome.bozier: review+


Attachments
CSV files. (772.28 KB, application/zip)
2008-10-03 07:00 EDT, Paul Slauenwhite CLA
no flags Details
Patch. (80.60 KB, patch)
2008-10-30 20:52 EDT, Paul Slauenwhite CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Slauenwhite CLA 2008-10-03 07:00:27 EDT
Created attachment 114178 [details]
CSV files.

Datapool (CSV) import wizard is slow to open when large datapools in the workspace.

Steps to Reproduce:

1) Import the four attach CSV files to datapools in the workspace.
2) Open the Import Datapool wizard and note the delay for the first page to appear.

This delay is caused by the second page of the wizard ("Import to an existing datapool") loads each datapool in the workspace to determine their logical name (see org.eclipse.hyades.test.ui.dialog.EObjectResourceContentProvider.getChildren(Object)).

The fix is to change the EObject resource content provider to a file resource content provider or a proxy resource content provider.
Comment 1 Paul Slauenwhite CLA 2008-10-03 07:01:08 EDT
This defect requires a new test case.
Comment 2 Paul Slauenwhite CLA 2008-10-15 10:35:52 EDT
The fix involves deprecating/cloning the /org.eclipse.hyades.test.ui/src/org/eclipse/hyades/test/ui/dialog/EObjectResource*.java classes to an internal package and used throughout the Test Project.  The new classes (e.g. ProxyNodeResource*.java) will uses proxy nodes and file resources instead of EObjects and files resources:

if(element instanceof IFile){
		
  IProxyNode proxyNode = FileProxyNodeCache.getInstance().getProxy(((IFile)(element)));
			
  if(proxyNode != null){
				
    if (proxyNode instanceof CMNNamedElementProxyNode){
      ((CMNNamedElementProxyNode)(proxyNode))....
    }
    else{
	proxyNode....
    }
  }
}
Comment 3 Paul Slauenwhite CLA 2008-10-15 12:28:14 EDT
Updated hours worked.
Comment 4 Paul Slauenwhite CLA 2008-10-30 20:52:11 EDT
Created attachment 116578 [details]
Patch.
Comment 5 Paul Slauenwhite CLA 2008-10-30 21:24:57 EDT
The attached patch provides the following:

-Deprecated the old EObject resource selection dialog, selection viewer, content provider, and label provider.
-New implementation of a proxy node selection dialog, selection viewer, content provider, and label provider.
-Refactoring of the following wizards/editors to use the new implementation of a proxy node selection dialog, selection viewer, content provider, and label provider:
  -Deployment editor (add test asset)
  -New deployment wizard (add artifact and location).
  -New artifact wizard (add test asset).
  -Import test log wizard.
  -Import datapool wizard.
  -Export datapool wizard.
-Refactoring the datapool import/export wizards to use common code for the existing datapool page and deprecated old/unused class.
-Several functional issues in the datapool import/export wizards.
-Updates to the JavaDoc API documentation.

This patch will allow the datapool import (and export) wizard to open immediately, independent of the number of existing datapools in the workspace.  Now, only the datapool selected in the wizard is loaded.

Added a new test case to /test/org.eclipse.hyades.test.ui.datapool.tests/manual/datapool/Test.UI.DatapoolEditor_importExport.testsuite for this defect.

Jerome: Please review the attached patch.  Since the patch is rather large, I would suggest applying the patch and synchronizing your workspace with CVS.
Comment 6 Bozier jerome CLA 2008-11-04 05:14:17 EST
patch reviewed and approved
Comment 7 Paul Slauenwhite CLA 2008-11-04 09:21:11 EST
Patch checked in to CVS (HEAD).
Comment 8 Paul Slauenwhite CLA 2008-12-22 10:40:20 EST
Verified in TPTP-4.5.2-200812010100.

Closing.