Open
Description
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