In File Loading Thread filechooser.isTraversable is run on COM thread

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 7
    • Component/s: client-libs
    • None
    • b60
    • 7
    • windows

      JFileChooser uses a background thread, BasicDirectoryModel.FilesLoader, to list the files and update the UI.

      To determine whether a file is traversable, the thread calls filechooser.isTraversable(file) which is executed on the COM thread on Windows. https://github.com/openjdk/jdk/blob/0583f7357480c0500daa82f490b2fcc05f2fb65a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicDirectoryModel.java#L318-L320

      That is for each and every file in list, there's a context switch between threads. This is very inefficient.

      Before the fix for JDK-6713352, this piece of code was executed inside ShellFolder.invoke.

            Assignee:
            Tejesh R
            Reporter:
            Alexey Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: