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

Do not invalidate parent paths when only file content has changed #13566

Merged
merged 2 commits into from
Nov 10, 2021

Conversation

stuhood
Copy link
Member

@stuhood stuhood commented Nov 10, 2021

We have avoided fine grained interaction with the notify crate so far, but now that we've seen that notify is reliable, we can slowly introduce more logic around event types.

This change skips invalidating the parent of a path when the event type is file-data-only (Modify(Data(Content))). As mentioned in #11707 though, it's not as effective as we might have hoped, since editors tend to write to temp files and then rename them. It might still have a positive impact in some cases, and seems like a relatively safe first step.

Fixes #11707.

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woot exciting! (Will wait to review till you request it)

@stuhood stuhood marked this pull request as ready for review November 10, 2021 17:28
@stuhood
Copy link
Member Author

stuhood commented Nov 10, 2021

Commits are useful to review independently: the first extracts a method without changes.

@stuhood stuhood enabled auto-merge (squash) November 10, 2021 17:30
@stuhood stuhood changed the title Conditionally remove parent invalidation when files change Do not invalidate parent paths when only file content has changed Nov 10, 2021
@stuhood stuhood merged commit c686c9c into pantsbuild:main Nov 10, 2021
@Eric-Arellano
Copy link
Contributor

Sweet. Needs cherry-pick?

@stuhood stuhood deleted the stuhood/remove-parent-invalidation branch November 10, 2021 18:04
@stuhood
Copy link
Member Author

stuhood commented Nov 10, 2021

Sweet. Needs cherry-pick?

I don't think so... I really don't expect this to have a ton of impact, but even if it did: best to let it bake a while.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Evaluate removing the invalidation of parent directories when files change
3 participants