micro
micro copied to clipboard
Poor performance on string highlighting
Description of the problem or steps to reproduce
In a large text document placing a single quote will freeze micro to the point where I end up just killing it. ):
Specifications
Version: 0.0.0-unknown Commit hash: 0859f4aa Compiled on June 09, 2023 OS: Arch Linux x64 Terminal: Kitty
Can you please provide a sample document? I will have a look into it, if things can be improved.
While trying to get something to work with strings I got it to work with the script
tag and it crashes as it attempts to highlight the js
This death by recursion is probably because of the highlighter now using a recursive regex.
The error is attatched since it's quiet long
error.log
Steps to reproduce:
- download sample.md file (doesn't let me attach html files)
- rename it to *.html
- open it in micro
- insert
- death
The original file I experiences the hang on can't be shared since it contains personal information
@SollyBunny: Please give some feedback how the general behavior is with #2840 regarding the performance.
Is the same
I took this issue and currently try to improve the highlighting performance. The first result is a ~50% faster highlighting, but it's still horrible slow in case a lot of (nested) regions are placed in a very long line. Further improvements need some larger rework in the highlighting code, which isn't really optimized so far. But this will take some more time, since changes there easily brake the whole feature. :wink: