14 Replies Latest reply on Oct 24, 2016 4:51 PM by Gary Graham-Oracle

    4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus

    Oracle-user2

      when multiple worksheets are open and clicking on a worksheet w/ ~1000 lines of SQL takes more than 30-40secs to gain focus so we can select a sql in that worksheet to execute .... still looking for options in preferences to figure out any existing setting to tweak ...thanks for any pointers experts.

        • 1. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
          thatJeffSmith-Oracle

          are these open files, i mean is your 1,000 line SQL statement in a file as it's opened in the worksheet?

           

          do you have the Outline panel open?

          • 2. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus

            when multiple worksheets are open and clicking on a worksheet w/ ~1000 lines of SQL takes more than 30-40secs to gain focus so we can select a sql in that worksheet to execute

            Ok - the key questions are:

             

            1. what are you doing in the 'current' worksheet or app when you decide to click on that other worksheet?

             

            2. are those worksheets shared? If so try using an independent worksheet.

            • 3. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
              Vadim Tropashko-Oracle

              There is a an established procedure to eliminate guesswork. Run sqldeveloper/bin/sqldeveloper.exe. It would start the tool together with java console. Whenever you experience any delay/focus problem hit Ctrl-break. Copy and paste stack trace from java console here.

              • 4. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                Oracle-user2

                yes the 1k line file is already open..& no the code outline isn't open To: Jeff SQLD Product Manager

                • 5. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                  Oracle-user2

                  @rp0428 

                   

                  #1 sth. like writing a Select ....& then trying to navigate to 1k line wroksheet (sort of SQL_Wiki) to double check if there already exists a similar SQL that I can tweak ....

                   

                  #2 no worksheet isn't shared ....& there isn't any 'active' connection associated to that SQL_Wiki worksheet

                  • 6. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                    Oracle-user2

                    @Vadim Tropashko-Oracle ...good to know .... will revert after trying this tomorrow.

                    • 7. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                      Oracle-user2

                      @Vadim Tropashko-Oracle

                       

                      here's the stack trace from java console....thanks.

                       

                      NAVIGATOR HOOK PROCESS DESCRIPTORS LOAD TIME : 149ms
                      
                      
                      java.lang.IndexOutOfBoundsException: Index: 1346, Size: 989
                              at java.util.ArrayList.rangeCheck(ArrayList.java:653)
                              at java.util.ArrayList.get(ArrayList.java:429)
                              at oracle.dbtools.raptor.plsql.structure.OutlinePanel$NodeRenderer.getTr
                      eeCellRendererComponent(OutlinePanel.java:640)
                              at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimen
                      sions(BasicTreeUI.java:2807)
                              at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayout
                      Cache.java:492)
                              at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePrefer
                      redSize(VariableHeightLayoutCache.java:1360)
                              at javax.swing.tree.VariableHeightLayoutCache.updateNodeSizes(VariableHe
                      ightLayoutCache.java:918)
                              at javax.swing.tree.VariableHeightLayoutCache.getBounds(VariableHeightLa
                      youtCache.java:219)
                              at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:529
                      )
                              at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:522
                      )
                              at javax.swing.plaf.basic.BasicTreeUI$Handler.valueChanged(BasicTreeUI.j
                      ava:3778)
                              at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTr
                      eeSelectionModel.java:635)
                              at javax.swing.tree.DefaultTreeSelectionModel.clearSelection(DefaultTree
                      SelectionModel.java:577)
                              at javax.swing.JTree.clearSelection(JTree.java:2667)
                              at javax.swing.JTree.setModel(JTree.java:851)
                              at oracle.dbtools.raptor.plsql.structure.OutlinePanel.setModel(OutlinePa
                      nel.java:585)
                              at oracle.dbtools.raptor.plsql.structure.OutlinePanel.buildNewOutlineTre
                      e(OutlinePanel.java:443)
                              at oracle.dbtools.raptor.plsql.structure.OutlinePanel.refresh(OutlinePan
                      el.java:411)
                              at oracle.dbtools.raptor.plsql.structure.OutlineWindow.refresh(OutlineWi
                      ndow.java:122)
                              at oracle.dbtools.raptor.plsql.PinningTracker.editorActivated(PinningTra
                      cker.java:42)
                              at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.fireEditorEvent(
                      NbEditorManager.java:1383)
                              at com.oracle.jdeveloper.nbwindowsystem.NbEditorManager.handleEditorEven
                      t(NbEditorManager.java:1364)
                              at com.oracle.jdeveloper.nbwindowsystem.NbEditorContainer.notifyEditorMa
                      nager(NbEditorContainer.java:521)
                              at com.oracle.jdeveloper.nbwindowsystem.NbEditorContainer.componentActiv
                      ated(NbEditorContainer.java:436)
                              at org.openide.windows.WindowManager.activateComponent(WindowManager.jav
                      a:291)
                              at org.netbeans.core.windows.WindowManagerImpl.notifyRegistryTopComponen
                      tActivated(WindowManagerImpl.java:1171)
                              at org.netbeans.core.windows.Central.setModeSelectedTopComponent(Central
                      .java:764)
                              at org.netbeans.core.windows.Central.userActivatedTopComponent(Central.j
                      ava:1941)
                              at org.netbeans.core.windows.view.DefaultView.userSelectedTab(DefaultVie
                      w.java:699)
                              at org.netbeans.core.windows.view.ui.TabbedHandler.stateChanged(TabbedHa
                      ndler.java:307)
                              at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
                              at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
                              at org.netbeans.core.windows.view.ui.tabcontrol.AbstractTabbedImpl.fireS
                      tateChanged(AbstractTabbedImpl.java:520)
                              at org.netbeans.core.windows.view.ui.tabcontrol.TabbedAdapter$1.stateCha
                      nged(TabbedAdapter.java:81)
                              at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:133)
                              at org.openide.util.ChangeSupport.fireChange(ChangeSupport.java:119)
                              at org.netbeans.swing.tabcontrol.plaf.DefaultTabSelectionModel.setSelect
                      edIndex(DefaultTabSelectionModel.java:111)
                              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayer
                      MouseListener.performCommand(BasicTabDisplayerUI.java:778)
                              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayer
                      MouseListener.potentialCommand(BasicTabDisplayerUI.java:767)
                              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayer
                      MouseListener.mousePressed(BasicTabDisplayerUI.java:742)
                              at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:27
                      9)
                              at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:27
                      9)
                              at java.awt.Component.processMouseEvent(Component.java:6530)
                              at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
                              at java.awt.Component.processEvent(Component.java:6298)
                              at java.awt.Container.processEvent(Container.java:2236)
                              at java.awt.Component.dispatchEventImpl(Component.java:4889)
                              at java.awt.Container.dispatchEventImpl(Container.java:2294)
                              at java.awt.Component.dispatchEvent(Component.java:4711)
                              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888
                      )
                              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4522)
                      
                      
                              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
                              at java.awt.Container.dispatchEventImpl(Container.java:2280)
                              at java.awt.Window.dispatchEventImpl(Window.java:2746)
                              at java.awt.Component.dispatchEvent(Component.java:4711)
                              at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
                              at java.awt.EventQueue.access$500(EventQueue.java:97)
                              at java.awt.EventQueue$3.run(EventQueue.java:709)
                              at java.awt.EventQueue$3.run(EventQueue.java:703)
                              at java.security.AccessController.doPrivileged(Native Method)
                              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
                      rivilege(ProtectionDomain.java:76)
                              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
                      rivilege(ProtectionDomain.java:86)
                              at java.awt.EventQueue$4.run(EventQueue.java:731)
                              at java.awt.EventQueue$4.run(EventQueue.java:729)
                              at java.security.AccessController.doPrivileged(Native Method)
                              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionP
                      rivilege(ProtectionDomain.java:76)
                              at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
                              at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQu
                      eueWrapper.java:169)
                              at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQue
                      ueWrapper.java:151)
                              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
                      ad.java:201)
                              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
                      java:116)
                              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
                      ad.java:105)
                              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
                      
                      
                              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
                              at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
                      
                      • 8. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus

                        Just an observation:

                        & no the code outline isn't open

                        But what you posted shows several lines like this one

                        1. at oracle.dbtools.raptor.plsql.structure.OutlinePanel$NodeRenderer.getTr 
                        2. eeCellRendererComponent(OutlinePanel.java:640) 

                        Suggests the code for 'outline' is  involved even if the outline isn't open?

                         

                        Only the devs would know.

                        • 10. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                          Vadim Tropashko-Oracle

                          I fixed this index out of range exception, although have no confidence that this would take care of the problem. Can I try this 1000 line sql script please? (I tried longer sql scripts and can't reproduce the delay).

                          • 11. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                            Oracle-user2

                            thanks for looking into this Vadim Tropashko-Oracle

                             

                            I'm afraid I may not - sorry. I can test a custom build if possible.

                             

                            nothing fancy in SQL though ... just Select statements - each spanning multiple lines 6-7 with a couple lines commented (to switch b/w easily) within each as below:

                             

                            Select
                            C1, C2, C3
                            --, Sum(C1), Sum(C2), Sum(C3)
                            , C4, C5
                            From T1
                            Where
                            C6 =
                            And C7 =
                            --And C8 =
                            --And C9 =
                            --Group By C1, C2, C3
                            Union
                            Select
                            C1, C2, C3
                            --, Sum(C1), Sum(C2), Sum(C3)
                            , C4, C5
                            From T2
                            Where
                            C6 =
                            And C7 =
                            --And C8 =
                            --And C9 =
                            --Group By C1, C2, C3
                            ;
                            
                            • 12. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                              Vadim Tropashko-Oracle

                              Thank you for helping to troubleshoot this. I multiplied your sample statement to grow it to a thousand lines of code in the editor, and it seems fine (that is the editor is responsive) both in 4.2E1 and the latest (where IndexOutOfBoundsException which you have discovered is fixed).

                               

                              BTW, the stack trace that you have exhibited is not complete. There should be more than one thread. It is still possible that the problem is somewhere else.

                              • 13. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                                Oracle-user2

                                Vadim Tropashko-Oracle

                                 

                                sorry slipped by to follow up ....great to hear the fix...

                                 

                                & on the stack trace retried even now and didn't notice anything different....can you elaborate on more than one thread so I can see what could be missing? thanks.

                                • 14. Re: 4.2EA - worksheet w/ ~1000 lines of SQL takes >=30-40secs to gain focus
                                  Gary Graham-Oracle

                                  I believe Vadim is requesting that you take a Full Thread Dump during the wait time to gain focus.  Two ways to do this...

                                  1. If your console's screen buffer size height is set high enough (at least 1,000) just do Ctrl-Break.

                                  2. Otherwise open another Cmd console and use Java's jps and jstack utilities, as in...

                                  HowToGetFullThreadDumpWithJstack.jpg

                                  etc.