Open Query Window on server with 1000's of databases or schemas
I think this is happening because of QueryPanelBar.setDatbases(). We add one item at a time with databaseField.addItem(Object), and the databaseField has many listeners. We should probably do a databaseField.addItem(ArrayList()).
Same thing for schemaCombo.addItem(Object)
Try server Oracle.11.53 with many schemas
Can you please attach or email me the config file for the server running on 11.53? I have access to Oracle server on 11.51 but not 11.53.
Can you please attach or email me the config file for the server running on 11.53? I have access to Oracle server on 11.51 but not 11.53.
I implemented some code to allow adding a list of items to JComboBox with only one notification sent to listeners, and then applied the new code to databaseFiled/schemaCombo.addItem(List); it did not help. I then added some debugging code to QueryPanel, it turned out most of time is spent on ConnectionmetaData.getSchemas() which is invoked by initComponents(). Below is a sample data by opening a Query tab against server on 11.53.
Line (34) shows the total time spent on success() is 2797 ms, and 2782 out of 2797 ms is used by initComponents (line 31). In initComponents(), line (09) shows 1813 ms out of 2797 ms is used by ConnectionMetaData.getSchemas(). On lines (20) and (21), schemaCombo/databaseField.addItems() only used 62 ms in total.
(01) QueryPanel constructor: 16 ms
(02) QueryPanel::process(): 468 ms // executed in non-EDT
(03) initComponents()-0-1: 0 ms
(04) initComponents()-0-2: 0 ms
(05) initComponents()-0-3:getDefaultSettings(): 250 ms
(06) initComponents()-0-4: 0 ms
(07) initComponents()-0-5:ConnectionProperties.getCurrentTempDatabase(): 0 ms
(08) extractSchemaList():ConnectionProperties.getCurrentSchema(): 0 ms
(09) extractSchemaList():ConnectionMetaData.getSchemas(): 1813 ms
(10) initComponents()-1:extractSchemaList(): 1813 ms
(11) initComponents()-2-0: 0 ms
(12) initComponents()-2-1:setEditorPane(): 31 ms
(13) initComponents()-2-2: 0 ms
(14) initComponents()-2-3:getNBEditorWrapComponent(4): 63 ms
(15) initComponents()-2-4: 0 ms
(16) initComponents()-2-5: 0 ms
(17) initComponents()-2-6: 0 ms
(18) initComponents()-2-7: 0 ms
(19) initComponents()-2-8:extractDatabaseList(): 0 ms
(20) schemaCombo.additems(): 62 ms
(21) databaseField.addItems(): 0 ms
(22) initComponents()-2-9:new QueryPanelBar(): 218 ms
(23) initComponents()-3: 16 ms
(24) initComponents()-31: 0 ms
(25) initComponents()-41: 0 ms
(26) initComponents()-51: 0 ms
(27) initComponents()-61: 16 ms
(28) initComponents()-71: 0 ms
(29) initComponents()-81: 0 ms
(30) initComponents():setContent(): 375 ms
(31) connectionSuccess():initComponents(): 2782 ms
(32) QueryPanel::success():connectionSuccess(): 2782 ms
(33) QueryPanel::success():postConnect(): 15 ms
(34) QueryPanel::success(): 2797 ms // executed in EDT
Compare to the sample data below which is collected by opening a Query panel against server running on 11.51 which has around 50 schema defined. Line (09) shows only 16 ms spent on ConnectionMetaData.getSchemas().
(01) QueryPanel constructor: 0 ms
(02) QueryPanel::process(): 406 ms
(03) initComponents()-0-1: 0 ms
(04) initComponents()-0-2: 0 ms
(05) initComponents()-0-3:getDefaultSettings(): 0 ms
(06) initComponents()-0-4: 0 ms
(07) initComponents()-0-5:ConnectionProperties.getCurrentTempDatabase(): 0 ms
(08) extractSchemaList():ConnectionProperties.getCurrentSchema(): 0 ms
(09) extractSchemaList():ConnectionMetaData.getSchemas(): 16 ms
(10) initComponents()-1:extractSchemaList(): 16 ms
(11) initComponents()-2-0: 0 ms
(12) initComponents()-2-1:setEditorPane(): 0 ms
(13) initComponents()-2-2: 0 ms
(14) initComponents()-2-3:getNBEditorWrapComponent(4): 16 ms
(15) initComponents()-2-4: 0 ms
(16) initComponents()-2-5: 0 ms
(17) initComponents()-2-6: 0 ms
(18) initComponents()-2-7: 0 ms
(19) initComponents()-2-8:extractDatabaseList(): 0 ms
(20) schemaCombo.additems(): 16 ms
(21) databaseField.addItems(): 0 ms
(22) initComponents()-2-9:new QueryPanelBar(): 31 ms
(23) initComponents()-3: 0 ms
(24) initComponents()-31: 0 ms
(25) initComponents()-41: 15 ms
(26) initComponents()-51: 0 ms
(27) initComponents()-61: 0 ms
(28) initComponents()-71: 16 ms
(29) initComponents()-81: 0 ms
(30) initComponents():setContent(): 16 ms
(31) connectionSuccess():initComponents(): 110 ms
(32) QueryPanel::success():connectionSuccess(): 110 ms
(33) QueryPanel::success():postConnect(): 0 ms
(34) QueryPanel::success(): 110 ms
I implemented some code to allow adding a list of items to JComboBox with only one notification sent to listeners, and then applied the new code to databaseFiled/schemaCombo.addItem(List); it did not help. I then added some debugging code to QueryPanel, it turned out most of time is spent on ConnectionmetaData.getSchemas() which is invoked by initComponents(). Below is a sample data by opening a Query tab against server on 11.53.
Line (34) shows the total time spent on success() is 2797 ms, and 2782 out of 2797 ms is used by initComponents (line 31). In initComponents(), line (09) shows 1813 ms out of 2797 ms is used by ConnectionMetaData.getSchemas(). On lines (20) and (21), schemaCombo/databaseField.addItems() only used 62 ms in total.
(01) QueryPanel constructor: 16 ms
(02) QueryPanel::process(): 468 ms // executed in non-EDT
(03) initComponents()-0-1: 0 ms
(04) initComponents()-0-2: 0 ms
(05) initComponents()-0-3:getDefaultSettings(): 250 ms
(06) initComponents()-0-4: 0 ms
(07) initComponents()-0-5:ConnectionProperties.getCurrentTempDatabase(): 0 ms
(08) extractSchemaList():ConnectionProperties.getCurrentSchema(): 0 ms
(09) extractSchemaList():ConnectionMetaData.getSchemas(): 1813 ms
(10) initComponents()-1:extractSchemaList(): 1813 ms
(11) initComponents()-2-0: 0 ms
(12) initComponents()-2-1:setEditorPane(): 31 ms
(13) initComponents()-2-2: 0 ms
(14) initComponents()-2-3:getNBEditorWrapComponent(4): 63 ms
(15) initComponents()-2-4: 0 ms
(16) initComponents()-2-5: 0 ms
(17) initComponents()-2-6: 0 ms
(18) initComponents()-2-7: 0 ms
(19) initComponents()-2-8:extractDatabaseList(): 0 ms
(20) schemaCombo.additems(): 62 ms
(21) databaseField.addItems(): 0 ms
(22) initComponents()-2-9:new QueryPanelBar(): 218 ms
(23) initComponents()-3: 16 ms
(24) initComponents()-31: 0 ms
(25) initComponents()-41: 0 ms
(26) initComponents()-51: 0 ms
(27) initComponents()-61: 16 ms
(28) initComponents()-71: 0 ms
(29) initComponents()-81: 0 ms
(30) initComponents():setContent(): 375 ms
(31) connectionSuccess():initComponents(): 2782 ms
(32) QueryPanel::success():connectionSuccess(): 2782 ms
(33) QueryPanel::success():postConnect(): 15 ms
(34) QueryPanel::success(): 2797 ms // executed in EDT
Compare to the sample data below which is collected by opening a Query panel against server running on 11.51 which has around 50 schema defined. Line (09) shows only 16 ms spent on ConnectionMetaData.getSchemas().
(01) QueryPanel constructor: 0 ms
(02) QueryPanel::process(): 406 ms
(03) initComponents()-0-1: 0 ms
(04) initComponents()-0-2: 0 ms
(05) initComponents()-0-3:getDefaultSettings(): 0 ms
(06) initComponents()-0-4: 0 ms
(07) initComponents()-0-5:ConnectionProperties.getCurrentTempDatabase(): 0 ms
(08) extractSchemaList():ConnectionProperties.getCurrentSchema(): 0 ms
(09) extractSchemaList():ConnectionMetaData.getSchemas(): 16 ms
(10) initComponents()-1:extractSchemaList(): 16 ms
(11) initComponents()-2-0: 0 ms
(12) initComponents()-2-1:setEditorPane(): 0 ms
(13) initComponents()-2-2: 0 ms
(14) initComponents()-2-3:getNBEditorWrapComponent(4): 16 ms
(15) initComponents()-2-4: 0 ms
(16) initComponents()-2-5: 0 ms
(17) initComponents()-2-6: 0 ms
(18) initComponents()-2-7: 0 ms
(19) initComponents()-2-8:extractDatabaseList(): 0 ms
(20) schemaCombo.additems(): 16 ms
(21) databaseField.addItems(): 0 ms
(22) initComponents()-2-9:new QueryPanelBar(): 31 ms
(23) initComponents()-3: 0 ms
(24) initComponents()-31: 0 ms
(25) initComponents()-41: 15 ms
(26) initComponents()-51: 0 ms
(27) initComponents()-61: 0 ms
(28) initComponents()-71: 16 ms
(29) initComponents()-81: 0 ms
(30) initComponents():setContent(): 16 ms
(31) connectionSuccess():initComponents(): 110 ms
(32) QueryPanel::success():connectionSuccess(): 110 ms
(33) QueryPanel::success():postConnect(): 0 ms
(34) QueryPanel::success(): 110 ms
Looks like the performance problem only happens on Linux. It takes 10 seconds on Ubuntu, but 2-3 seconds on Windows and OSX.
We'll need to run the debugging code on the Ubuntu dev environment.
Looks like the performance problem only happens on Linux. It takes 10 seconds on Ubuntu, but 2-3 seconds on Windows and OSX.
We'll need to run the debugging code on the Ubuntu dev environment.
(01) initComponents()-0-1: 0 ms
(02) initComponents()-0-2: 0 ms
(03) initComponents()-0-3:getDefaultSettings(): 0 ms
(04) initComponents()-0-4: 0 ms
(05) initComponents()-0-5:ConnectionProperties.getCurrentTempDatabase(): 0 ms
(06) extractSchemaList():ConnectionProperties.getCurrentSchema(): 1 ms
(07) extractSchemaList():ConnectionMetaData.getSchemas(): 2030 ms
(08) initComponents()-1:extractSchemaList(): 2033 ms
(09) initComponents()-2-0: 0 ms
(10) initComponents()-2-1:setEditorPane(): 26 ms
(11) initComponents()-2-2: 0 ms
(12) initComponents()-2-3:getNBEditorWrapComponent(4): 20 ms
(13) initComponents()-2-4: 0 ms
(14) initComponents()-2-5: 0 ms
(15) initComponents()-2-6: 0 ms
(16) initComponents()-2-7: 0 ms
(17) initComponents()-2-8:extractDatabaseList(): 0 ms
(18) schemaCombo.additems(): 5222 ms
(19) QueryPanelBar::0-1:setSchemas() 5223 ms
(20) QueryPanelBar::0-2:schemaCombo.setSelectedItem() 206 ms
(21) QueryPanelBar::1: 5454 ms
(22) databaseField.addItems(): 2 ms
(23) QueryPanelBar::2: 21 ms
(24) initComponents()-2-9:new QueryPanelBar(): 5485 ms
(25) initComponents()-3: 0 ms
(26) initComponents()-31: 0 ms
(27) initComponents()-41: 15 ms
(28) initComponents()-51: 5 ms
(29) initComponents()-61: 1 ms
(30) initComponents()-71: 1 ms
(31) initComponents()-81: 0 ms
(32) QueryPanel::setContent():panel.removeAll(1): 18 ms
(33) QueryPanel::setContent():panel.setCenter(): 3 ms
(34) QueryPanel::setContent():panel.validate(): 12692 ms
(35) QueryPanel::setContent():panel.repaint(): 0 ms
(36) initComponents():setContent(): 12716 ms
(37) connectionSuccess():initComponents(): 20313 ms
(38) QueryPanel::success():connectionSuccess(): 20314 ms
(39) QueryPanel::success():postConnect(): 15 ms
(40) QueryPanel::success(): 20329 ms
Above is a sample data collected on Linux, the total time used to construct/display the query panel is 20.3 seconds (line# 40). The 3 most expensive calls are:
line (07) - extractSchemaList():ConnectionMetaData.getSchemas(): 2030 ms
line (18) - schemaCombo.additems(): 5222 ms
line (34) - QueryPanel::setContent():panel.validate(): 12692 ms
(01) initComponents()-0-1: 0 ms
(02) initComponents()-0-2: 0 ms
(03) initComponents()-0-3:getDefaultSettings(): 0 ms
(04) initComponents()-0-4: 0 ms
(05) initComponents()-0-5:ConnectionProperties.getCurrentTempDatabase(): 0 ms
(06) extractSchemaList():ConnectionProperties.getCurrentSchema(): 1 ms
(07) extractSchemaList():ConnectionMetaData.getSchemas(): 2030 ms
(08) initComponents()-1:extractSchemaList(): 2033 ms
(09) initComponents()-2-0: 0 ms
(10) initComponents()-2-1:setEditorPane(): 26 ms
(11) initComponents()-2-2: 0 ms
(12) initComponents()-2-3:getNBEditorWrapComponent(4): 20 ms
(13) initComponents()-2-4: 0 ms
(14) initComponents()-2-5: 0 ms
(15) initComponents()-2-6: 0 ms
(16) initComponents()-2-7: 0 ms
(17) initComponents()-2-8:extractDatabaseList(): 0 ms
(18) schemaCombo.additems(): 5222 ms
(19) QueryPanelBar::0-1:setSchemas() 5223 ms
(20) QueryPanelBar::0-2:schemaCombo.setSelectedItem() 206 ms
(21) QueryPanelBar::1: 5454 ms
(22) databaseField.addItems(): 2 ms
(23) QueryPanelBar::2: 21 ms
(24) initComponents()-2-9:new QueryPanelBar(): 5485 ms
(25) initComponents()-3: 0 ms
(26) initComponents()-31: 0 ms
(27) initComponents()-41: 15 ms
(28) initComponents()-51: 5 ms
(29) initComponents()-61: 1 ms
(30) initComponents()-71: 1 ms
(31) initComponents()-81: 0 ms
(32) QueryPanel::setContent():panel.removeAll(1): 18 ms
(33) QueryPanel::setContent():panel.setCenter(): 3 ms
(34) QueryPanel::setContent():panel.validate(): 12692 ms
(35) QueryPanel::setContent():panel.repaint(): 0 ms
(36) initComponents():setContent(): 12716 ms
(37) connectionSuccess():initComponents(): 20313 ms
(38) QueryPanel::success():connectionSuccess(): 20314 ms
(39) QueryPanel::success():postConnect(): 15 ms
(40) QueryPanel::success(): 20329 ms
Above is a sample data collected on Linux, the total time used to construct/display the query panel is 20.3 seconds (line# 40). The 3 most expensive calls are:
line (07) - extractSchemaList():ConnectionMetaData.getSchemas(): 2030 ms
line (18) - schemaCombo.additems(): 5222 ms
line (34) - QueryPanel::setContent():panel.validate(): 12692 ms
I added some classes in com.common.ui.listener package and applied CListenerManager.addItems(JComboBox, LIst<Object>) to schemaCombo, it did not help at all.
I added some classes in com.common.ui.listener package and applied CListenerManager.addItems(JComboBox, LIst<Object>) to schemaCombo, it did not help at all.
Here is some performance information on Ubuntu 12.04 - Java 1.6.0_31 :
PERFORMANCE: 3:34:25 PM : QueryPanel.initComponents().extractSchemaList(): 3205 m/s
PERFORMANCE: 3:34:29 PM : QueryPanelBar.setSchemas().schemaCombo.addItems(): 3723 m/s
PERFORMANCE: 3:34:39 PM : QueryPanel.setConent().validate()/repaint(): 9362 m/s
PERFORMANCE: 3:34:39 PM : QueryPanel.connectionSuccess().initComponents(): 16510 m/s
Here is some performance information on Ubuntu 12.04 - Java 1.6.0_31 :
PERFORMANCE: 3:34:25 PM : QueryPanel.initComponents().extractSchemaList(): 3205 m/s
PERFORMANCE: 3:34:29 PM : QueryPanelBar.setSchemas().schemaCombo.addItems(): 3723 m/s
PERFORMANCE: 3:34:39 PM : QueryPanel.setConent().validate()/repaint(): 9362 m/s
PERFORMANCE: 3:34:39 PM : QueryPanel.connectionSuccess().initComponents(): 16510 m/s
Looks like these might be caused by multiple Java 1.7.0_06 bugs on Linux :
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181082
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181081
Reported by the Netbeans team :
http://netbeans.org/bugzilla/show_bug.cgi?id=214853
http://netbeans.org/bugzilla/show_bug.cgi?id=214872
Looks like these might be caused by multiple Java 1.7.0_06 bugs on Linux :
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181082
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7181081
Reported by the Netbeans team :
http://netbeans.org/bugzilla/show_bug.cgi?id=214853
http://netbeans.org/bugzilla/show_bug.cgi?id=214872
1.) Not able to reproduce in Ubuntu 64 bit 12.04 with latest JRE 1.7.0_25-b15 and ADS 13.0.2-4 Build.
Comes up in 2-3 seconds as in Windows. Used the same Oracle 9i at 10.168.11.54 which has got lots of schemas to test.
2.) I cannot find the bugs logged in sun.com to verify if they are fixed and could not verify the ones of Netbeans team cause of proxy
1.) Not able to reproduce in Ubuntu 64 bit 12.04 with latest JRE 1.7.0_25-b15 and ADS 13.0.2-4 Build.
Comes up in 2-3 seconds as in Windows. Used the same Oracle 9i at 10.168.11.54 which has got lots of schemas to test.
2.) I cannot find the bugs logged in sun.com to verify if they are fixed and could not verify the ones of Netbeans team cause of proxy
This problem was actually resolved by some changes Ivan made a while back.
This problem was actually resolved by some changes Ivan made a while back.
Issue #7217 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
No fixed build |
No time estimate |
1 issue link |
is required by #7443
Issue #7443Threaded visual editing dialogs on Ubuntu doesn't seem to thread |
I think this is happening because of QueryPanelBar.setDatbases(). We add one item at a time with databaseField.addItem(Object), and the databaseField has many listeners. We should probably do a databaseField.addItem(ArrayList()).
Same thing for schemaCombo.addItem(Object)
Try server Oracle.11.53 with many schemas