Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 384194 - Initializing Data Perspective or data tools wizard takes a long time to show the available connections the first time.
Summary: Initializing Data Perspective or data tools wizard takes a long time to show ...
Status: RESOLVED FIXED
Alias: None
Product: Data Tools
Classification: Tools
Component: Connection Mgt Framework (show other bugs)
Version: 1.10   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 1.10.1   Edit
Assignee: Brian Payton CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-03 14:40 EDT by Salvador Ledezma CLA
Modified: 2013-05-29 18:24 EDT (History)
3 users (show)

See Also:


Attachments
suggested fix in file DriverManager (37.67 KB, text/plain)
2012-07-03 15:04 EDT, Salvador Ledezma CLA
no flags Details
Patch for the proposed fix (6.37 KB, patch)
2012-08-16 19:24 EDT, Salvador Ledezma CLA
no flags Details | Diff
Patch for v1.10 (3.84 KB, patch)
2012-08-17 20:18 EDT, Salvador Ledezma CLA
no flags Details | Diff
1.8.2a patch (4.35 KB, patch)
2012-08-20 14:30 EDT, Salvador Ledezma CLA
no flags Details | Diff
1.10 patch (3.82 KB, patch)
2012-08-20 14:31 EDT, Salvador Ledezma CLA
no flags Details | Diff
1.9.2 (4.14 KB, patch)
2012-08-20 14:31 EDT, Salvador Ledezma CLA
bpayton: iplog+
Details | Diff
Revised 1.10 patch (3.86 KB, patch)
2012-08-20 18:42 EDT, Salvador Ledezma CLA
bpayton: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Salvador Ledezma CLA 2012-07-03 14:40:44 EDT
Build Identifier: Version: 3.6.3.r362_v20110302 Build id: M20111020-1539

I did some profiling and I determined that the performance bottleneck was in the way that driver definitions and profiles are initialized.  This can happen whenever a list of available connection profiles are needed and can cause the UI to hang or appear to hang.

If the Data Perspective is set to open when starting Eclipse, it will also contribute to the Eclipse startup time.

The gist of the problem is that as driver definitions are created, they are continuously saved to a file and then immediately read back.  This was done > 100 times since there are > 100 default driver definitions created during initialization, for this particular instance of Eclipse.

I have prototyped a fix for consideration.  The nature of the fix was to batch the file I/O.  Instead of saving each definition one at a time, the set of 100 are saved at the end once processing has completed.  I was able to see improvements of about 69%.

plugin: org.eclipse.datatools.connectivity
DriverManager

Reproducible: Always

Steps to Reproduce:
1. Start Eclipse in a new workspace and switch to the data perspective
2. alternatively, start Eclipse and open a wizard that requires a list of available connection profiles.
Comment 1 Salvador Ledezma CLA 2012-07-03 14:42:17 EDT
Brian Payton has requested to be assigned this bug for further evaluation.
Comment 2 Salvador Ledezma CLA 2012-07-03 15:04:48 EDT
Created attachment 218231 [details]
suggested fix in file DriverManager

I have attached the proposed fix.  Please let me know if a CVS patch or git format  is needed.
Comment 3 Brian Payton CLA 2012-08-15 20:03:58 EDT
Hi Sal, I need a patch attached in standard (CVS) format.  For some reason EGit doesn't like Git-format patches.
Comment 4 Salvador Ledezma CLA 2012-08-16 19:24:50 EDT
Created attachment 219982 [details]
Patch for the proposed fix

Since the proposed fix is against v1.9.2, I was only able to create an EGit patch.  But please let me know if there is a better way.
Comment 5 Salvador Ledezma CLA 2012-08-17 20:18:32 EDT
Created attachment 220027 [details]
Patch for v1.10

this is the patch for v1.10
Comment 6 Salvador Ledezma CLA 2012-08-20 14:30:19 EDT
Created attachment 220069 [details]
1.8.2a patch
Comment 7 Salvador Ledezma CLA 2012-08-20 14:31:21 EDT
Created attachment 220070 [details]
1.10 patch
Comment 8 Salvador Ledezma CLA 2012-08-20 14:31:51 EDT
Created attachment 220071 [details]
1.9.2
Comment 9 Brian Payton CLA 2012-08-20 14:54:54 EDT
OK, both the 1.8.2a and 1.10 patches apply cleanly now.  Thanks!  (The 1.9.2 stream is closed, so we can't apply any changes to it.)
Comment 10 Salvador Ledezma CLA 2012-08-20 18:42:41 EDT
Created attachment 220083 [details]
Revised 1.10 patch

latest 1.10 patch with fixes.
the 1.8.2a patch looks to be ok.
Comment 11 Brian Payton CLA 2012-08-20 20:45:58 EDT
I've delivered the change to the 1.10.1 (head) stream and the 1.8.2a stream.

Here's the Git commit record for the 1.10.1 stream change:
http://git.eclipse.org/c/datatools/org.eclipse.datatools.connectivity.git/commit/?id=d91d44db1dab3278e980c5aae7dfa96050f4698a

And here's the commit record for the 1.8.2a stream change:
http://git.eclipse.org/c/datatools/org.eclipse.datatools.connectivity.git/commit/?h=DTP_1_8_2_Branch_a&id=ebafd4d2f2e4aeea53940dcc34e1cee1390137b6