fish-shell/fish-rust
Fabian Boehm 86803e4442
Reduce stat calls for wildcards ending in "/" (#10032)
This makes it so expand_intermediate_segment knows about the case
where it's last, only followed by a "/".

When it is, it can do without the file_id for finding links (we don't
resolve the files we get here), which allows us to remove a stat()
call.

This speeds up the case of `...*/` by quite a bit.

If that last component was a directory with 1000 subdirectories we
could skip 1000 stat calls!

One slight weirdness: We refuse to add links to directories that we already visited, even if they are the last component and we don't actually follow them. That means we can't do the fast path here either, but we do know if something is a link (if we get d_type), so it still works in common cases.
2023-10-08 16:46:59 +02:00
..
src Reduce stat calls for wildcards ending in "/" (#10032) 2023-10-08 16:46:59 +02:00
widestring-suffix Move edition and MSRV to workspace 2023-08-19 15:18:38 +02:00
build.rs Port UVAR_FILE_SET_MTIME_HACK 2023-10-07 19:30:46 +02:00