|
| From: | Christopher M. Miles |
| Subject: | [ISSUE] org-mode fill paragraph is slow and suspend often |
| Date: | Tue, 26 Oct 2021 14:18:42 +0800 |
| User-agent: | mu4e 1.7.0; emacs 28.0.60 |
When I press [M-q] on the following org-mode buffer content:
* 绵羊是太阳能农场的优秀管理员:PROPERTIES::SOURCE: 奇客Solidot–传递最新科技情报:DATE(original): [2021-10-25 Mon 17:28]:DATE: [2021-10-26 Tue]:END:有利于放养家畜和有利于太阳能发电的地方经常重叠。它们都需要平坦、阳光充足,没有高大植被的开阔地。因此太阳能生产商正越来越多地租用农田运营。太阳能产量的增加具有环境效益,但是其代价可能是农业产量的下降。因而人们越来越有兴趣寻找在同一个地方结合农业和太阳能生产的方法。对于康奈尔大学农业综合企业副教授 Todd Schmit 来说,[问题的答案是羊群]()。这仍然是一个新领域,部分农民正和太阳能生产商合作,在后者的土地上放牧。太阳能生产商付钱给农民,让他们把羊送到他们的太阳能农场,羊会吃掉杂草和其他可能阻挡阳光到达太阳能板的植物。羊得到了食物,农民得到了报酬,而太阳能生产商则在不使用割草机和除草机的情况下管理农场的植被------割草机和除草机很难伸到太阳能面板下方,而且需要使用化石燃料。American Solar Grazing Association(ASGA)的[报告]()显示,该行业自 2017 年以来,一直在纽约州扩张。帝国州(纽约州)报告指出,目前有 900 英亩的太阳能生产土地正在放牧。增长空间仍然很大。
Emacs often suspend for a long time.
So I take a profiling test with Emacs profiler. Seems org-fill-element spend a lot of CPU and memory.
Here is the result:
CPU Profiler Report:
3623 65% - command-execute3623 65% - call-interactively3623 65% - funcall-interactively3141 56% - org-fill-paragraph3141 56% - let3141 56% - cond3141 56% - let3141 56% - unwind-protect3141 56% - progn3140 56% - while2096 37% - org-fill-element2090 37% - let2090 37% - unwind-protect2089 37% - progn2079 37% - let2044 36% - save-excursion2032 36% - org-element-at-point2027 36% - let1546 27% - if1473 26% - progn1473 26% - if1473 26% - if1467 26% - org-element--cache-sync1467 26% - if1467 26% - progn1441 25% - save-current-buffer1416 25% - if1410 25% - let1400 25% - let1334 23% - catch1332 23% - and1332 23% - org-indent-add-properties1332 23% - let1332 23% - unwind-protect1332 23% - progn1332 23% - save-excursion1332 23% - save-restriction1301 23% - let1301 23% - catch1301 23% - and1301 23% - org-indent-add-properties1301 23% - let1301 23% - unwind-protect1301 23% - progn1301 23% - save-excursion1301 23% - save-restriction1301 23% - let*1296 23% - let*1296 23% - unwind-protect1296 23% - progn1296 23% - while1296 23% - cond1155 20% and87 1% - org-at-item-p83 1% - save-excursion80 1% - and65 1% - org-list-in-valid-context-p64 1% - not63 1% - org-in-block-p63 1% - let60 1% - unwind-protect60 1% - progn60 1% + catch8 0% + looking-at40 0% + org-indent-set-line-properties4 0% + let*4 0% + or1 0% + org-get-limited-outline-regexp30 0% + let*1 0% + if1 0% + while5 0% + if51 0% + and10 0% + if4 0% + org-element--cache-active-p3 0% + eq481 8% + setq1 0% setq14 0% + let*1036 18% + org-backward-paragraph476 8% + counsel-M-x3 0% + next-line2 0% + end-of-buffer1 0% + previous-line1917 34% - ...1917 34% Automatic GC17 0% + timer-event-handler12 0% + redisplay_internal (C function)1 0% + global-aggressive-indent-mode-check-buffers1 0% + emojify-update-visible-emojis-background-after-command
Memory Profiler Report
264,854,075 76% - command-execute264,854,075 76% - call-interactively264,854,075 76% - funcall-interactively255,418,275 73% - org-fill-paragraph255,418,275 73% - let255,418,275 73% - cond255,204,659 73% - let255,204,659 73% - unwind-protect255,204,659 73% - progn255,204,659 73% - while180,115,491 51% - org-backward-paragraph180,115,491 51% - if180,115,491 51% - while180,115,491 51% - org--backward-paragraph-once176,778,067 50% - save-restriction176,778,067 50% - cond165,159,987 47% - let*141,442,819 40% - org--paragraph-at-point138,407,875 39% - let*107,627,587 31% - org-element-at-point106,599,043 30% - let60,513,047 17% - setq60,513,047 17% - if59,896,343 17% - condition-case56,847,671 16% - org-element--parse-to56,847,671 16% - catch26,082,351 7% - let22,117,552 6% - unwind-protect22,117,552 6% - progn20,683,728 5% - save-excursion20,683,728 5% - save-restriction15,229,632 4% - let*6,096,288 1% + let3,049,728 0% and2,037,024 0% cond46,085,996 13% + if20,238,240 5% + if7,524,000 2% + cond9,968,048 2% + cond995,808 0% if2,436,160 0% + and73,443,920 21% - org-fill-element71,424,848 20% - let71,424,848 20% - unwind-protect71,424,848 20% - progn70,403,696 20% - let66,939,368 19% - save-excursion64,924,520 18% - org-element-at-point63,913,928 18% - let34,076,928 9% - setq34,076,928 9% - if33,458,112 9% - condition-case30,389,376 8% - org-element--parse-to30,389,376 8% - catch29,392,512 8% - let25,565,952 7% - unwind-protect25,565,952 7% - progn24,103,120 6% - save-excursion20,814,528 6% - save-restriction15,259,200 4% - let*6,083,616 1% + let3,057,120 0% and2,057,088 0% cond29,837,000 8% + if1,036,408 0% + let*213,616 0% + save-excursion9,014,486 2% + counsel-M-x375,920 0% + previous-line28,348 0% + next-line9,984 0% + org-end-of-line6,336 0% + keyboard-quit484 0% + end-of-buffer242 0% + set-mark-command65,166,568 18% - redisplay_internal (C function)64,739,756 18% - jit-lock-function64,739,756 18% - jit-lock-fontify-now64,739,756 18% - jit-lock--run-functions64,739,756 18% - run-hook-wrapped64,739,756 18% - #<compiled 0x19d0e565f4fbf57d>64,467,389 18% - font-lock-fontify-region64,467,389 18% - font-lock-default-fontify-region64,466,333 18% - font-lock-fontify-keywords-region64,230,944 18% + org-activate-links8,288 0% + org-cite-activate6,944 0% + org-raise-scripts6,176 0% + org-fontify-meta-lines-and-blocks6,160 0% + org-activate-dates5,440 0% + org-activate-tags5,440 0% + org-activate-footnote-links5,340 0% + org-fontify-entities5,248 0% + org-fontify-drawers5,248 0% + org-fontify-macros5,248 0% + org-font-lock-add-priority-faces5,120 0% + org-font-lock-add-tag-faces5,120 0% + org-do-emphasis-faces5,120 0% + org-do-latex-and-related5,120 0% + org-activate-code1,056 0% + font-lock-unfontify-region254,519 0% + emojify-redisplay-emojis-in-region15,736 0% + valign-region239,728 0% + eval178,900 0% + #<compiled -0x194fe16722977b6d>16,698,568 4% + timer-event-handler42,080 0% + emojify-update-visible-emojis-background-after-command18,768 0% + winner-save-old-configurations3,180 0% + gui-set-selection2,154 0% + #<compiled -0x2222a52d2f12599>0 0% ...
<#secure method=pgpmime mode=sign>
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
| [Prev in Thread] | Current Thread | [Next in Thread] |