zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
24.96k stars 1.17k forks source link

Micro does not respnoe when edit specific file #3115

Open dustdfg opened 8 months ago

dustdfg commented 8 months ago

Description of the problem or steps to reproduce

Open it with micro and try to edit. It won't respond anymore and killing terminal doesn't kill micro

tileset_env_test

Specifications

Commit hash: https://github.com/zyedidia/micro/commit/2d82362a6695a7e898455ce016449167ac439ddd OS: Debian12 Terminal: foot,

JoeKar commented 8 months ago

Duplicate of #2839

There is still an recursion within highlightEmptyRegion() and highlightRegion() due to the "fix" of nested highlights. The same can be reproduced e.g. by using the "NewTab" page of Firefox or some other nested HTML or XML likes where the whole nesting takes place on one line.

This definitely needs a fix to remove this nasty recursion and to improve the performance.

JoeKar commented 8 months ago

As written in #2839 am at this topic and use your file as benchmark too, but the rework takes a lot of time. The easy and low cost improvement reduced the parsing time by the half.