visual-regexp.el icon indicating copy to clipboard operation
visual-regexp.el copied to clipboard

vr is extermely slow in Windows7

Open pavlo-alkhimov opened this issue 6 years ago • 5 comments

Using profiler-start/profiler-report I figured out, that visual-regexp is very slow in Windows. In Linux this problem is not available. GNU Emacs 25.3.1 (x86_64-w64-mingw32) of 2017-09-12 visual-regexp 20161017.1713 from elpa

pavlo-alkhimov avatar Oct 06 '17 12:10 pavlo-alkhimov

vr starts a Python process for every keystroke, maybe Windows is less efficient with that? Maybe a long running Python process could be used instead.

Happy for anyone using Windows to analyze this and make a PR. Sorry I can't be of more help, I don't have access to any Windows machine.

benma avatar Oct 06 '17 17:10 benma

For those who are interested: http://python.readthedocs.io/en/v2.7.2/faq/windows.html#why-does-python-sometimes-take-so-long-to-start It seems to be exactly my case as I use a company PC which checks if every executed program is permitted to run or not.

pavlo-alkhimov avatar Oct 09 '17 12:10 pavlo-alkhimov

Only visual-regexp-steroids.el starts Python, correct?

Should these hooks be added when vr is entered and removed when it is ended?

https://github.com/benma/visual-regexp.el/blob/b3096c2d391ff4e28a2a4e8cd82efbf11071ea85/visual-regexp.el#L455 https://github.com/benma/visual-regexp.el/blob/b3096c2d391ff4e28a2a4e8cd82efbf11071ea85/visual-regexp.el#L463

net avatar Oct 01 '18 14:10 net

Yes, correct.

The hooks don't do anything when vr is not used actively, so it shouldn't be noticeable.

benma avatar Oct 02 '18 07:10 benma

Should these hooks be added when vr is entered and removed when it is ended?

Finally done in https://github.com/benma/visual-regexp.el/commit/3e3ed81a3cbadef1f1f4cb16f9112a58641d70ca

benma avatar Apr 14 '19 08:04 benma