robertgzr / porcelain

a git status parser
MIT License
34 stars 7 forks source link

Slowness during merge/rebase with lots of conflicts #7

Open robertgzr opened 5 years ago

robertgzr commented 5 years ago

This is apparent when porcelain is run directly in the prompt, since it takes up to a few seconds for the shell to accept new input

Possible solutions:

LukasJue commented 5 years ago

I think the lowest hanging fruit would be to detect a "hard to parse"-state and show a reasonable and short message like "merging", "paused" or "skipping"

robertgzr commented 5 years ago

I started work on a reimplementation

I haven't looked into it too much but it should be possible to parse the merge-conflict state directly from the .git dir

I tried using git ls-files with the state flags but that would mean we have to call out to git a lot, which I wanted to avoid

LukasJue commented 5 years ago

You could create a small directory cache anywhere, but that increases the complexity of a) the parsing process and b) porcelain as a whole. There you could reduce the information amount from everything git can do, to the very special usecase of porcelain, and increase performance. But caches could bring a lot of trouble...