Commit 38b063e
authored
Avoid slow Files#isDirectory call in testFilter (#63)
On ZIP file systems, `Files.isDirectory` ends up being very slow if the
path does not exist (similarly to `Files.exists`, which is worked around
in UnionFS). We can take advantage of the existing workaround by using
our `getFileAttributes` method instead, which attempts to check if the
file exists using much more efficient logic.
See the profiler screenshot below for an example of the problem.
1 parent 8d3b608 commit 38b063e
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
456 | | - | |
| 456 | + | |
| 457 | + | |
457 | 458 | | |
458 | 459 | | |
459 | 460 | | |
| |||
0 commit comments