TIL about #Emacs
If Emacs is slow to respond, you can analyse runtime behaviour with the built-in profiler.
1. Start the profiler (`M-x profiler-start`) for CPU usage.
2. Do a bit of representative work for a short while.
3. Stop the profiler (`M-x profiler-report`).
4. Check the report buffer for function calls that are high in relative CPU time.
Documentation:
https://www.gnu.org/software/emacs/manual/html_node/elisp/Profiling.html
This already saved me nerves. It turned out that some minor mode I had configured struggled with opening and navigating large text files.
Wondering how I could debug this took much longer than using the profiler. The profiler helped me solve the problem in less than five minutes, including learning that the profiler exists and how to use it.
Apart from that, here we go again: Emacs, camouflaged as text editor, ships a profiler by default. Of course it would.
@pdbartlett Exactly! :)
@floppy@fosstodon.org oh! This is good. I am going to find why markdown mode on my Emacs struggles