zyedidia / micro

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

Big file is freeze the micro for a while #3277

Closed 1buran closed 2 months ago

1buran commented 2 months ago

Description of the problem or steps to reproduce

It seems like the micro editor performance issue: "re-analyze" (re apply the color scheme or something else what it does) whole file on every char input.

It freezes for a while and then hangs again on every char input, the htop shows big CPU consumption in that time (see attached screenshots) :(

Steps to reproduce:

  1. Open a big file. e.g. 26k+ lines of php code
  2. Try to add something - the micro will be freezed on every char entered

First opening: image

Editing: image

Specifications

Commit hash: 68d88b57 (Version: 2.0.13) OS: Manjaro Linux 23.1.4 (Arch Linux) Terminal: kitty

1buran commented 2 months ago

Sorry for bothering, seems I found the root of problem, it is not micro, it is lsp. Disabling lsp returned back fast editing without any freezes!

Close this one cos this is LSP plugin issue.

1buran commented 2 months ago

https://github.com/AndCake/micro-plugin-lsp/issues/62