After his post on dealing with long lines in Emacs, Alain M. Lafon got a comment complaining that he didn’t mention how to profile the situation. To remedy that, he’s posted a short introduction to profiling in Emacs. If you’re not familiar with the process, you’ll be pleasantly surprised at how easy it is.
In the simplest case, which covers most situations, there are only three commands to worry about. To profile an operation, you
- Start the profiler with
profiler-start
. - Run the operation.
- Stop the profiler with
profiler-stop
. - Get the results of the profiling with
profiler-report
.
That’s all there is to it. There’s a video with the post that runs through the process for the long lines problem. The video is short (6 minutes, 32 seconds) so you shouldn’t have any problem finding time for it. As Lafon says, there’s lot of reasons you might want to profile an operation even if you aren’t an Elisp programmer. The post and video are definitely worth your time