Forum Discussion

matthiasblaesin's avatar
matthiasblaesin
New Contributor
12 years ago

DirectoryChooser (Export Definition) is very slow on windows

Hello,

I use soap-ui to test webservices. Occasionally I need to export the WSDL+XSD and then I'm faced with a blocking directory chooser. I select "Export Definition" on the bindings note and after that it takes a very long time (> 2 Minutes) to open the directory chooser.

While the whole time is spend in javax.swing.filechooser.FileSystemView.getFiles(). It looks as if the dialog tries to enumerate all networked computers in our domain (the domain spans the whole country). I would be happy if I could get fast access to my local machine, because that is where I need the artifacts.

Is there a way to work around this?

Attached you find a Profiler Snapshot (taken with jvisualvm while the dialog is opening). The AWT Thread is blocked by the call to javax.swing.plaf.basic.BasicFileChooserUI$BasicFileView.getCachedIcon().

Thanks

Matthias
  • Hi,

    This behavior happens when you expand the Network tree in the "Select output directory". If the Network tree is not expanded you should not see such a long delay.




    Regards,
    Marcus
    Smartbear Support
  • Hey,

    mrJames wrote:
    This behavior happens when you expand the Network tree in the "Select output directory". If the Network tree is not expanded you should not see such a long delay.


    this would be a behaviour I would expect (someone should fix the block of the AWT thread, but that are details). In this case I did not expand the network icon by hand, but it is "pre-opened".

    Ok - I went through the called code and it looks like this is happening:

    1. JDirectoryChooser ist instanziated without a default folder
    2. this in turn calls the super constructor (JFileChooser) without a default folder
    3. the constructor calls JFileChooser#setCurrentDirectory with null argument
    4. this causes a call to javax.swing.filechooser.FileSystemView#getDefaultDirectory()
    5. this causes a call to ShellFolder.get("fileChooserDefaultFolder")
    6. the implementation on windows now uses a native call sun.awt.shell.Win32ShellFolder2#getFileSystemPath0

    This is where it goes into flames. My folder "Eigene Dateien" ("Persona Files" in english?!) is a UNC path.

    So now I know why it happes, but not how to fix this. I'll have to find a way to override the return of getFileSystemPath0 over the windows defaults. But that is not your problem and caused by our companies network architecture. Thanks for your reply.
  • Hi Matthias,

    We have logged SOAP-908 in response to the behavior you have reported with the directory dialog.