visual-regexp.el
visual-regexp.el copied to clipboard
vr is extermely slow in Windows7
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
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.
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.
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
Yes, correct.
The hooks don't do anything when vr is not used actively, so it shouldn't be noticeable.
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