-
-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Description
I was surprised to find that when profiling my app - I'm getting significant hangs with Path.ls()
I can see that you added .sorted() in #58
First comment is that the doc is wrong - it states:
Same as the `ls` command ∴ output is ”shallow” and unsorted.
Profiling a running app, I'm seeing 0.6 seconds spent doing locale-specific sorting for a not-particularly-huge directory, and a surprisingly large cost for the compactMap()
Not sure what the right approach would be here. I'll probably add an unsorted_ls() command for my own use.
Possible options:
- Remove the comment that output is unsorted
- Flag that sorting can be expensive in the docs
- ListDirectoryOptions: add an unsorted option ??
- Add a separate unsorted command
Metadata
Metadata
Assignees
Labels
No labels