Forum Stats

  • 3,840,087 Users
  • 2,262,565 Discussions
  • 7,901,147 Comments

Discussions

SQL Developer 20.2 IndexPreferencesTask very slow

C. L.
C. L. Member Posts: 19 Blue Ribbon

Hi there

We are on Windows 10 (Build 1909, but also ocurrs on lower builds) and the first time the SQL Developer is started in a session there is a tremendous delay while trying to open the preferences. I have timed the task several times and it takes over a minute, sometimes close to two minutes before the preferences window shows.

The next time is very fast, unfortunately this ocurrs whenever you close the sql developer and restart it.

Do you know what causes this issue?

Regs,

Carmen

Best Answers

«1

Answers

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,706 Employee

    yes, we're indexing all of the preferences so that the search will work


    just wait for it to finish before you attempt to open the preferences

  • C. L.
    C. L. Member Posts: 19 Blue Ribbon

    Is there someway to speed it up? does it need more resources? it's terribly slow

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,706 Employee

    only takes a few moments on my machine, yet for others it can take a few minutes


    it really only affects opening the Preferences dialog, do you really need to open that at the very beginning of each session?


    i can give you a workaround to disable it if you'd like

  • C. L.
    C. L. Member Posts: 19 Blue Ribbon

    Thank you for your Feedback. I don't always need to open the preferences up, but often the kerberos settings need to be checked, specially during tests and it takes around two minutes to open.

    I would love the workaround, I can use that for the tests :)

  • C. L.
    C. L. Member Posts: 19 Blue Ribbon

    Oh, I see what it does. Loading the contents of the tree is very slow. OK. I can live with that for the tests, takes less than the 2 minutes.

    Thank you!

    Another question: Whats happening with the indexing: are you loading the contents of the json/xml files into memory? Why do you think that is slower for some customers (virus scans?)?

  • Jim 13131
    Jim 13131 Member Posts: 60 Blue Ribbon

    I definitely see a pattern to the speed - when i am connected to some VPNs (I support a lot of customers around the world so am on different VPNs all the time) it is much slower than others. No VPN is fastest. This is repeatable.

    I believe this indicates the indexing is doing something across the network/web - should 't this all be local?


    Better yet - can't we save the index? Does what it is indexing ever change except when I upgrade SQL Developer?

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,706 Employee

    yes, we're going through your folders/drives indexing paths that were previously used to do exports/file opens/saves

  • user4870401
    user4870401 Member Posts: 2 Blue Ribbon
    edited Feb 4, 2021 8:06AM

    We have the same problem. We work around it by replacing the jre and lib folders under sqldeveloper\jdk with another version, in my case jdk1.8.0_181 from adopt

    Taking a stack trace displays the code caching a JFileChooser. This JFileChooser scans your whole %USERPROFILE% folder. This causes it to mount any link, sharepoint folder, network connection, ...

    I saw it take 20 minutes in an extreme case.


    UPDATE: Just retried it here with an unmodified 20.2.0.175 build 175.1842

    IndexPreferenceTask took time 8:57:10 - 9:00:54 , so 3:44 minutes. Closing it and reopening it does NOT shorten this time much. Here is a stack trace:

    ---

    aptorTaskThread02-IndexPreferencesTask" #45 prio=5 os_prio=0 tid=0x000000001eff0800 nid=0x2f70 waiting on condition [0x000000002b31d000]

      java.lang.Thread.State: WAITING (parking)

        at sun.misc.Unsafe.park(Native Method)

        - parking to wait for <0x00000000df2cd820> (a java.util.concurrent.FutureTask)

        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)

        at java.util.concurrent.FutureTask.awaitDone(FutureTask.java:429)

        at java.util.concurrent.FutureTask.get(FutureTask.java:191)

        at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Win32ShellFolderManager2.java:591)

        at sun.awt.shell.ShellFolder.invoke(ShellFolder.java:518)

        at sun.awt.shell.ShellFolder.invoke(ShellFolder.java:504)

        at sun.awt.shell.Win32ShellFolder2.getLinkLocation(Win32ShellFolder2.java:810)

        at sun.awt.shell.Win32ShellFolder2.getLinkLocation(Win32ShellFolder2.java:806)

        at sun.awt.shell.Win32ShellFolderManager2.checkFile(Win32ShellFolderManager2.java:394)

        at sun.awt.shell.Win32ShellFolderManager2.lambda$checkFiles$0(Win32ShellFolderManager2.java:422)

        at sun.awt.shell.Win32ShellFolderManager2$$Lambda$57/534809017.test(Unknown Source)

        at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174)

        at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)

        at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)

        at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)

        at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:546)

        at java.util.stream.AbstractPipeline.evaluateToArrayNode(AbstractPipeline.java:260)

        at java.util.stream.ReferencePipeline.toArray(ReferencePipeline.java:438)

        at sun.awt.shell.Win32ShellFolderManager2.checkFiles(Win32ShellFolderManager2.java:423)

        at sun.awt.shell.Win32ShellFolderManager2.checkFiles(Win32ShellFolderManager2.java:410)

        at sun.awt.shell.Win32ShellFolder2.listFiles(Win32ShellFolder2.java:736)

        at sun.awt.shell.ShellFolder.listFiles(ShellFolder.java:121)

        at sun.awt.shell.Win32ShellFolderManager2.isFileSystemRoot(Win32ShellFolderManager2.java:465)

        at sun.awt.shell.ShellFolder.isFileSystemRoot(ShellFolder.java:273)

        at javax.swing.filechooser.FileSystemView.isFileSystemRoot(FileSystemView.java:348)

        at javax.swing.filechooser.FileSystemView.getSystemDisplayName(FileSystemView.java:184)

        at oracle.ide.net.FileURLFileSystemHelper.getSystemDisplayName(FileURLFileSystemHelper.java:412)

        at oracle.ide.net.URLFileSystemHelperDecorator.getSystemDisplayName(URLFileSystemHelperDecorator.java:189)

        at oracle.ide.net.URLFileSystemHelperDecorator.getSystemDisplayName(URLFileSystemHelperDecorator.java:189)

        at oracle.ide.net.URLFileSystemHelperDecorator.getSystemDisplayName(URLFileSystemHelperDecorator.java:189)

        at oracle.ideimpl.net.LazyURLFileSystemHelperDecorator.getSystemDisplayName(LazyURLFileSystemHelperDecorator.java:242)

        at oracle.ide.net.URLFileSystemHelperDecorator.getSystemDisplayName(URLFileSystemHelperDecorator.java:189)

        at oracle.ide.net.URLFileSystem.getSystemDisplayName(URLFileSystem.java:840)

        at oracle.ide.net.URLNode.toString(URLNode.java:249)

        at javax.swing.JTree.convertValueToText(JTree.java:1603)

        at javax.swing.tree.DefaultTreeCellRenderer.getTreeCellRendererComponent(DefaultTreeCellRenderer.java:428)

        at oracle.ide.net.URLChooser$TCR.getTreeCellRendererComponent(URLChooser.java:4218)

        at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.getNodeDimensions(BasicTreeUI.java:2807)

        at javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:492)

        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.updatePreferredSize(VariableHeightLayoutCache.java:1360)

        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1487)

        at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.expand(VariableHeightLayoutCache.java:1288)

        at javax.swing.tree.VariableHeightLayoutCache.rebuild(VariableHeightLayoutCache.java:743)

        at javax.swing.tree.VariableHeightLayoutCache.treeStructureChanged(VariableHeightLayoutCache.java:644)

        at javax.swing.plaf.basic.BasicTreeUI$Handler.treeStructureChanged(BasicTreeUI.java:3917)

        at javax.swing.tree.DefaultTreeModel.fireTreeStructureChanged(DefaultTreeModel.java:580)

        at javax.swing.tree.DefaultTreeModel.nodeStructureChanged(DefaultTreeModel.java:365)

        at oracle.ide.net.URLChooser.flushNodes(URLChooser.java:2040)

        at oracle.ide.net.URLChooser.refreshAll(URLChooser.java:2046)

        at oracle.ide.net.URLChooser.setSelectionScope(URLChooser.java:1259)

        at oracle.dbtools.raptor.ui.URLFileChooser.setSelectionScope(URLFileChooser.java:209)

        at oracle.dbtools.raptor.ui.URLFileChooser$URLFileChooserPanel.setSelectionScope(URLFileChooser.java:1207)

        at oracle.dbtools.raptor.config.TnsnamesDirChooser.jbInit(TnsnamesDirChooser.java:78)

        at oracle.dbtools.raptor.config.TnsnamesDirChooser.<init>(TnsnamesDirChooser.java:45)

        at oracle.dbtools.raptor.config.AdvancedInfo.<init>(AdvancedInfo.java:55)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)

        at javax.ide.util.MetaClass.newInstance(MetaClass.java:145)

        at oracle.dbtools.raptor.standalone.IndexedPreferencesCommand$IndexPreferencesTask.doWork(IndexedPreferencesCommand.java:122)

        at oracle.dbtools.raptor.standalone.IndexedPreferencesCommand$IndexPreferencesTask.doWork(IndexedPreferencesCommand.java:65)

        at oracle.dbtools.raptor.backgroundTask.RaptorTask.call(RaptorTask.java:199)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at oracle.dbtools.raptor.backgroundTask.RaptorTaskManager$RaptorFutureTask.run(RaptorTaskManager.java:702)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

        at java.lang.Thread.run(Thread.java:748)

  • thatJeffSmith-Oracle
    thatJeffSmith-Oracle Distinguished Product Manager Posts: 8,706 Employee
    Answer ✓

    preferences - environment - persist file names and directory paths => DISABLE