Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Discard anticipated filesystem events #727

Open
@smashwilson

Description

@smashwilson

The performance benefits from #700 are muted somewhat by the fact that the git operation cache evictions from filesystem events are broader than those from the operations that trigger them. For instance, when staging a line from a file, we cache the results from the status and patch generation calls, but then immediately evict them when the resulting .git/index filesystem event arrives:

screen shot 2017-05-03 at 8 21 35 am

In the worst case, the filesystem event arrives before the automatic render completes, which prompts React to group the resulting state changes into a single, slower render.

The solution is to predict the filesystem events that will be produced by any invalidating Repository action and perform no cache evictions or didUpdate events. We'll likely want to bound the prediction with a timeout of a second or two to avoid ignoring too much.

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