Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slow dialog box when opening a file #313

Closed
charphi opened this issue Jun 4, 2024 · 1 comment · Fixed by #314
Closed

Fix slow dialog box when opening a file #313

charphi opened this issue Jun 4, 2024 · 1 comment · Fixed by #314
Assignees
Labels
bug Something isn't working
Milestone

Comments

@charphi
Copy link
Contributor

charphi commented Jun 4, 2024

The file selection dialogue box can sometimes appear very slowly.
The problem seems to be related to the operating system, the network and the user's desktop shortcuts.

So far, the possible causes are a combination of the following:

  • Windows OS
  • Some disconnected network drives (such as disabled corporate VPN)
  • Some links to these disconnected drives or to missing files

The cause could be the use of the operating system icon of a disconnected network drive from the current Swing Look&Feel.
This problem is difficult to reproduce and is often hidden by multiple layers of caches.

The class javax.swing.filechooser.FileSystemView seems to be the main source of problems. Expecially:

  • FileSystemView#getChooserComboBoxFiles(): its result contains network drives on Windows
  • FileSystemView#getChooserShortcutPanelFiles()
  • FileSystemView#getSystemIcon(File)
  • FileSystemView#getSystemIcon(File, int, int)
  • FileSystemView#getSystemDisplayName(File)
@charphi charphi added the bug Something isn't working label Jun 4, 2024
@charphi charphi added this to the 3.2.3 milestone Jun 4, 2024
@charphi charphi self-assigned this Jun 4, 2024
@charphi charphi linked a pull request Jun 5, 2024 that will close this issue
@charphi
Copy link
Contributor Author

charphi commented Jun 7, 2024

For reference, I have created an issue at FlatLaf repository to find a better solution.
See JFormDesigner/FlatLaf#849

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant