Skip to content

Batch-invalidate files to improve latency when many files have changed (such as after branch switches) #16132

Open
@stuhood

Description

@stuhood

Currently, the InvalidationWatcher handles one event at a time. When thousands of files have changed (such as after a branch switch), this can lag behind by seconds to minutes (as observed by watching .pants.d/pants.log: particularly in debug mode).

To handle multiple events at a time, the event handler thread could attempt to drain the queue of events (by looping on Receiver::try_receive) each time it receives one event. The handle_event method would then become handle_events, which would allow for a larger set of invalidations to hit the impl Invalidatable for Graph instance at a time.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions