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

Changing File type is not responsive - p1 #33

Closed
ghost opened this issue May 21, 2021 · 6 comments
Closed

Changing File type is not responsive - p1 #33

ghost opened this issue May 21, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented May 21, 2021

Replicate:

  1. Create a new File chooser.
  2. Add a file filter to exclude files matching the glob pattern **/.*.
  3. Open the File chooser in a directory with fewer than 50 hidden files/directories and fewer than 10 regular files.
  4. Set File type to the exclude file pattern.

Expected:

  • The File type drop-down opens instantly.
  • Upon selecting the exclude filter, the file listing is updated instantly.
  • Scrolling file listing is snappy.

Actual:

  • The drop-down takes about 0.5s to open.
  • Selecting a different exclude filter takes about 0.75s.
  • Scrolling the file list is jerky and unresponsive.

Any ideas what's causing these delays? (If it was 10,000 files, I could understand a teeny tiny delay, but using a 3GHz processor alongside 32GB RAM reading from a super-fast SSD, I'd anticipate nearly instantaneous response times even for 10k files, much less ~50.)

The previous version does not exhibit such behaviour. It seems likely that the filters are causing the issues.

See #32 for a minimal example.

@ghost ghost added the bug Something isn't working label May 21, 2021
@ghost ghost changed the title Changing File type is not responsive Changing File type is not responsive - p1 May 21, 2021
@io7m
Copy link
Member

io7m commented Jul 5, 2021

I'm just seeing this one now. Apparently I never got a notification!

I should be able to take a look at this today... We certainly shouldn't be seeing these kinds of performance issues.

@io7m
Copy link
Member

io7m commented Jul 5, 2021

Any chance you could get this into a test case so that I can throw CI at it on various platforms? I'm unable to reproduce it on any of my local machines here.

What JVM is showing this behaviour?

@ghost
Copy link
Author

ghost commented Jul 5, 2021

Any chance you could get this into a test case so that I can throw CI at it on various platforms?

Probably not until September.

What JVM is showing this behaviour?

$ java -version
openjdk version "16.0.1" 2021-04-20
OpenJDK Runtime Environment (build 16.0.1+9)
OpenJDK 64-Bit Server VM (build 16.0.1+9, mixed mode, sharing)

https://bell-sw.com/pages/downloads/#/java-16-current

Running on Linux.

The previous version does not exhibit such behaviour.

Correction: There is a super-slight delay when scrolling/jumping to the end of the listing in the previous release, but not nearly as noticeable as the latest version.

@io7m
Copy link
Member

io7m commented Jul 5, 2021

Probably not until September.

Ok, that's not a problem. Whenever you can get to it!

Looks like I'm still on at most JDK 15. Using the new glob-based filters will be potentially more I/O heavy because they have to ask the filesystem to create new glob matchers, and they have to check Files.isDirectory for each path twice. I wouldn't expect that to cause a regression like this though.

Is this exclusive to the new glob filters?

@ghost
Copy link
Author

ghost commented Jul 5, 2021

Is this exclusive to the new glob filters?

Seems likely, given that that's the new feature I tried to use, but cannot say with 100% certainty.

@io7m
Copy link
Member

io7m commented Apr 23, 2024

I've never been able to reproduce this, and the OP is gone!

@io7m io7m closed this as completed Apr 23, 2024
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

No branches or pull requests

1 participant