emacs-php / emacs-php/php-mode
Pasting lines is slow in large files
- Dominant language
- Emacs Lisp
- Stars
- 602
- Forks
- 117
- Avg merge
- 12h 54m
- Merged PRs (30d)
- 3
Description
1. Take any sufficiently big PHP file ([slightly exaggerated example file](https://p.teknik.io/K1GuH)).
2. Open it in php-mode.
3. Copy any line or block of code (even an empty line).
4. Paste it. It's going to be noticeably slow.
If running on a supercomputer, spam that paste chord a bit (the pastes will queue, it will take a while).
Undoing the operations will be similarly slow.
The slowness is increased the bigger the file.

It seems like the culprit is https://github.com/emacs-php/php-mode/blob/c53e0c1ec154fcfe6e5db56d1513d503a62e0355/php-mode.el#L954
Notice there are no heredocs at all in the file.
Contributor guide
Assessment
This issue has not been assessed yet.