{"id":9191,"date":"2020-10-05T12:03:33","date_gmt":"2020-10-05T16:03:33","guid":{"rendered":"https:\/\/irreal.org\/blog\/?p=9191"},"modified":"2020-10-05T12:03:33","modified_gmt":"2020-10-05T16:03:33","slug":"introduction-to-emacs-profiling","status":"publish","type":"post","link":"https:\/\/irreal.org\/blog\/?p=9191","title":{"rendered":"Introduction to Emacs Profiling"},"content":{"rendered":"<p>After his post on <a href=\"https:\/\/irreal.org\/blog\/?p=9183\">dealing with long lines in Emacs<\/a>, Alain M. Lafon got a comment complaining that he didn\u2019t mention how to profile the situation. To remedy that, he\u2019s posted a <a href=\"https:\/\/200ok.ch\/posts\/2020-10-01_introduction_to_profiling_in_emacs.html\">short introduction to profiling in Emacs<\/a>. If you\u2019re not familiar with the process, you\u2019ll be pleasantly surprised at how easy it is.<\/p>\n<p>In the simplest case, which covers most situations, there are only three commands to worry about. To profile an operation, you<\/p>\n<ol class=\"org-ol\">\n<li>Start the profiler with <code>profiler-start<\/code>.<\/li>\n<li>Run the operation.<\/li>\n<li>Stop the profiler with <code>profiler-stop<\/code>.<\/li>\n<li>Get the results of the profiling with <code>profiler-report<\/code>.<\/li>\n<\/ol>\n<p>That\u2019s all there is to it. There\u2019s 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\u2019t have any problem finding time for it. As Lafon says, there\u2019s lot of reasons you might want to profile an operation even if you aren\u2019t an Elisp programmer. The post and video are definitely worth your time<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After his post on dealing with long lines in Emacs, Alain M. Lafon got a comment complaining that he didn\u2019t mention how to profile the situation. To remedy that, he\u2019s posted a short introduction to profiling in Emacs. If you\u2019re &hellip; <a href=\"https:\/\/irreal.org\/blog\/?p=9191\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[18],"class_list":["post-9191","post","type-post","status-publish","format-standard","hentry","category-general","tag-emacs"],"_links":{"self":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9191","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9191"}],"version-history":[{"count":1,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9191\/revisions"}],"predecessor-version":[{"id":9192,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/9191\/revisions\/9192"}],"wp:attachment":[{"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9191"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9191"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/irreal.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9191"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}