Skip to content

Ensure that trivial skipping is done prior to filesystem calls.#1660

Closed
rkhoury wants to merge 2 commits intoBurntSushi:masterfrom
rkhoury:skip_before_stat
Closed

Ensure that trivial skipping is done prior to filesystem calls.#1660
rkhoury wants to merge 2 commits intoBurntSushi:masterfrom
rkhoury:skip_before_stat

Conversation

@rkhoury
Copy link
Contributor

@rkhoury rkhoury commented Aug 20, 2020

This seems like an obvious optimization but becomes critical when
filesystem operations even as simple as stat can result in
significant overheads; an example of this was a bespoke filesystem
layer in Windows that hosted files remotely and would download them
on-demand when particular filesystem operations occurred. Users of
this system who ensured correct file-type fileters were being used
could still get unnecessary file access resulting in large downloads.

This seems like an obvious optimization but becomes critical when
filesystem operations even as simple as stat can result in
significant overheads; an example of this was a bespoke filesystem
layer in Windows that hosted files remotely and would download them
on-demand when particular filesystem operations occurred. Users of
this system who ensured correct file-type fileters were being used
could still get unnecessary file access resulting in large downloads.
@rkhoury
Copy link
Contributor Author

rkhoury commented Aug 20, 2020

This is based on the discussion: #1657
I've only rearranged the code that affected my particular scenario, so this is not intended to be an exhaustive optimization pass. Let me know if the code comment is what you had imagined or is too verbose.

@BurntSushi BurntSushi added the rollup A PR that has been merged with many others in a rollup. label May 31, 2021
BurntSushi pushed a commit that referenced this pull request May 31, 2021
This seems like an obvious optimization but becomes critical when
filesystem operations even as simple as stat can result in significant
overheads; an example of this was a bespoke filesystem layer in Windows
that hosted files remotely and would download them on-demand when
particular filesystem operations occurred. Users of this system who
ensured correct file-type fileters were being used could still get
unnecessary file access resulting in large downloads.

Fixes #1657, Closes #1660
BurntSushi pushed a commit that referenced this pull request Jun 1, 2021
This seems like an obvious optimization but becomes critical when
filesystem operations even as simple as stat can result in significant
overheads; an example of this was a bespoke filesystem layer in Windows
that hosted files remotely and would download them on-demand when
particular filesystem operations occurred. Users of this system who
ensured correct file-type fileters were being used could still get
unnecessary file access resulting in large downloads.

Fixes #1657, Closes #1660
@BurntSushi BurntSushi closed this in a28e664 Jun 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rollup A PR that has been merged with many others in a rollup.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants