#4284

Micro having a lot of CPU load on big files even after closed

Openmarc-dantasopened 4d ago

Description

I'm experiencing a problem when opening big files in Micro.

In the video attached, I open a C source-code file of around 1.2MB, right away you can notice high CPU usage while the file is open, this is understandable.

The problem here is that even after closing the file, CPU usage remais high as if the program still had that file loaded and processing something (I'd guess probably syntax highlighting because it seems incomplete when I open the file). The only way to solve this, as far as I tested, is to restart Micro.

https://github.com/user-attachments/assets/88344cc5-0fc6-4182-bda0-fa6d283799a2

If you have any more questions about my setup here i'd be glad to answer.

Best regards, love your project!

Environment

  • Version: 2.0.15 (6a62575b)
  • OS: Debian 13 (Linux 6.12.107)
  • Terminal: alacritty

Activity

1
Andriamanitra4d ago

The highlighter's poor performance is a known issue but it's weird that the CPU usage remains high even after closing the file.

Workarounds

You can try this PR to see if it helps:

  • #3127

You can also try disabling syntax highlighting when opening large files:

micro -syntax off assets.c