victor-torres / atom-hg

Mercurial support for Atom text editor. Works on Linux, Mac OS X and Windows.
https://atom.io/packages/atom-hg
MIT License
27 stars 5 forks source link

Editor unresponsive for 3-5 second lag after atom window regains focus #21

Closed sirianni closed 8 years ago

sirianni commented 8 years ago

It seems like an hg command is spawned each time the atom window regains focus. On medium/large repos this can cause a 3-5 second lag before you can actually type in the atom window. It seems like this may be a general issue with the atom VCS framework as it occurs with git repos as well as hg.

See:

victor-torres commented 8 years ago

This may be fixed by #15. It was also reported in #26.

TomKemperNL commented 8 years ago

I've made this worse for some repositories in Pull Request #25. (especially deeply nested node_modules) I'll make this my next priority.

MikeRatcliffe commented 8 years ago

I had a 10 second pause when refocusing the editor and it went down to 15ms using this fork: apm install tomkempernl/atom-hg

TomKemperNL commented 8 years ago

Good to hear it's helping someone! Unfortunately the only thing I changed is removing the blocking IO. Whatever took 10 seconds (probably refreshing all the ignored files) still takes 10 seconds, it just won't freeze atom anymore.

I'm guessing if you refocus, and quickly open a folder with ignored files, they'll be there for a few seconds...

Fair warning: my fork should be considered 'beta'. I plan on using it personally, so I can test my changes a bit better before creating a pull request for victor.