Comments (8)
from literate-calc-mode.el.
- call-interactively 1,402,968,081 88%
- funcall-interactively 1,400,252,139 88%
- org-self-insert-command 1,130,024,964 71%
- self-insert-command 1,129,993,988 71%
- literate-calc--eval-buffer 1,129,905,268 71%
- literate-calc-eval-buffer 1,129,904,228 71%
+ run-hook-with-args-until-success 1,093,198,178 69%
+ literate-calc--process-line 7,508,840 0%
+ thing-at-point 2,686,920 0%
+ literate-calc-clear-overlays 54,392 0%
count-lines 12,482 0%
+ jit-lock-after-change 26,624 0%
+ internal-auto-fill 21,904 0%
+ org-indent-notify-modified-headline 21,552 0%
+ org-indent-refresh-maybe 18,496 0%
+ undo-auto--undoable-change 144 0%
+ org-fix-tags-on-the-fly 13,312 0%
+ org-at-table-p 11,392 0%
+ run-hook-with-args-until-success 6,272 0%
+ evil-org-delete 261,457,465 16%
+ counsel-M-x 7,469,068 0%
+ evil-ex 698,983 0%
+ evil-normal-state 349,881 0%
+ evil-emacs-state 155,850 0%
+ org-return 95,832 0%
+ file-notify-handle-event 96 0%
+ byte-code 2,715,942 0%
+ evil-escape-pre-command-hook 174,612,987 11%
+ redisplay_internal (C function) 1,925,943 0%
+ timer-event-handler 484,853 0%
+ evil-normal-post-command 308,478 0%
+ winner-save-old-configurations 8,288 0%
+ company-post-command 1,312 0%
+ key-chord-input-method 168 0%
... 0 0%
As can be seen, it is 71%
from literate-calc-mode.el.
Hey, thanks for that profile.
I pushed a change to #19 which uses a configurable idle timer instead of an after-edit-function, could you give that a go and tell me if that works for you?
from literate-calc-mode.el.
Thanks for looking into this. I see that it has improved but still lagging. Here is the updated profile
- command-execute 1,731,506,806 99%
- call-interactively 1,731,506,806 99%
- funcall-interactively 1,731,506,806 99%
- org-self-insert-command 1,207,795,516 69%
- self-insert-command 1,207,752,736 69%
- literate-calc--eval-buffer 1,207,638,672 69%
- literate-calc-eval-buffer 1,207,637,552 69%
- run-hook-with-args-until-success 1,180,981,606 68%
- literate-calc-mode-inhibit-in-src-blocks 1,180,981,606 68%
- org-element-context 1,179,512,454 68%
- org-element-at-point 1,163,677,593 67%
- org-element--parse-to 1,141,679,128 65%
- org-element--current-element 1,110,910,949 64%
+ org-element-src-block-parser 281,301,710 16%
- org-element-paragraph-parser 100,780,119 5%
+ count-lines 2,016 0%
- org-element--list-struct 32,152,584 1%
match-string-no-properties 50,436 0%
vector 2,676 0%
string-match 1,845 0%
looking-at 1,332 0%
org-element--collect-affiliated-keywords 18,957,053 1%
+ org-element-comment-parser 10,629,848 0%
+ org-at-heading-p 4,585,593 0%
org-element-plain-list-parser 4,557,000 0%
org-element-item-parser 921,360 0%
org-element-table-parser 449,842 0%
+ org-get-limited-outline-regexp 109,408 0%
org-element-table-row-parser 67,560 0%
+ org-element-keyword-parser 64,264 0%
+ org-element-fixed-width-parser 14,336 0%
looking-at 4,617 0%
line-beginning-position 1,062 0%
outline-previous-heading 24,631,064 1%
+ org-get-limited-outline-regexp 154,149 0%
plist-put 9,533 0%
org-element--cache-put 1,690 0%
+ org-element-headline-parser 16,417,028 0%
+ org-at-heading-p 1,666,845 0%
+ org-get-limited-outline-regexp 69,696 0%
+ org-element--object-lex 12,017,168 0%
+ derived-mode-p 29,568 0%
+ literate-calc--process-line 9,148,870 0%
+ thing-at-point 2,735,848 0%
+ literate-calc-clear-overlays 58,576 0%
count-lines 12,297 0%
+ org-indent-refresh-maybe 31,888 0%
+ internal-auto-fill 30,624 0%
+ jit-lock-after-change 28,672 0%
+ org-indent-notify-modified-headline 18,432 0%
+ undo-auto--undoable-change 304 0%
+ org-fix-tags-on-the-fly 14,336 0%
+ org-at-table-p 13,440 0%
+ run-hook-with-args-until-success 4,096 0%
- org-delete-backward-char 517,390,795 29%
- backward-delete-char 517,378,187 29%
- apply 517,378,187 29%
- #<compiled -0x198008633ec8508> 517,378,187 29%
- apply 517,378,187 29%
- ad-Advice-delete-backward-char 517,378,187 29%
- #<compiled -0x1defac228b83f95> 517,378,187 29%
- delete-char 517,378,187 29%
- apply 517,378,187 29%
- #<subr delete-char> 517,378,187 29%
- literate-calc--eval-buffer 517,344,771 29%
- literate-calc-eval-buffer 517,344,771 29%
- run-hook-with-args-until-success 506,458,561 29%
- literate-calc-mode-inhibit-in-src-blocks 506,458,561 29%
- org-element-context 505,804,738 29%
- org-element-at-point 499,010,812 28%
- org-element--parse-to 489,596,747 28%
- org-element--current-element 476,384,930 27%
- org-element-src-block-parser 120,814,898 6%
- org-unescape-code-in-string 44,566,195 2%
- replace-regexp-in-string 28,723,802 1%
apply 15,480,872 0%
#<compiled 0x1e0f6757ffbb> 7,497 0%
string-match 1,681 0%
- replace-regexp-in-string 28,226,374 1%
apply 1,876,232 0%
#<compiled 0x1e0f6757ffbb> 1,654 0%
org-string-nw-p 9,855,128 0%
match-string-no-properties 817,137 0%
looking-at 1,542 0%
- org-element-paragraph-parser 43,518,898 2%
line-beginning-position 1,690 0%
re-search-forward 1,672 0%
+ org-element--list-struct 13,733,849 0%
org-element--collect-affiliated-keywords 8,096,401 0%
+ org-element-comment-parser 4,526,058 0%
org-element-plain-list-parser 1,991,616 0%
+ org-at-heading-p 1,850,784 0%
org-element-item-parser 414,424 0%
org-element-table-parser 183,466 0%
+ org-get-limited-outline-regexp 53,856 0%
+ org-element-keyword-parser 21,184 0%
org-element-table-row-parser 18,432 0%
+ org-element-fixed-width-parser 6,144 0%
looking-at 2,203 0%
outline-previous-heading 10,560,632 0%
+ org-get-limited-outline-regexp 59,307 0%
plist-put 1,654 0%
+ org-element-headline-parser 7,045,633 0%
+ org-at-heading-p 698,608 0%
+ org-get-limited-outline-regexp 30,624 0%
+ org-element--object-lex 5,156,522 0%
+ derived-mode-p 21,503 0%
+ literate-calc--process-line 3,538,752 0%
+ thing-at-point 1,122,540 0%
+ literate-calc-clear-overlays 25,104 0%
count-lines 4,461 0%
+ jit-lock-after-change 16,432 0%
+ org-indent-refresh-maybe 6,544 0%
+ org-indent-notify-modified-headline 6,144 0%
+ undo-auto--undoable-change 152 0%
+ org-fix-tags-on-the-fly 6,464 0%
+ counsel-M-x 5,608,929 0%
+ evil-emacs-state 711,566 0%
+ redisplay_internal (C function) 1,420,672 0%
+ timer-event-handler 532,123 0%
+ evil-escape-pre-command-hook 30,712 0%
+ winner-save-old-configurations 16,576 0%
+ company-post-command 1,448 0%
... 0 0%
from literate-calc-mode.el.
As said, you can "play" with idle time. For example, lag is gone if you add this to your init.el:
'(literate-calc-mode-idle-time 5)
from literate-calc-mode.el.
You might also want to set it on a per-buffer basis, maybe even based on the buffer size. I don't think I'd want to default the package to that though, as that would feel arbitrary and random to users.
from literate-calc-mode.el.
You might also want to set it on a per-buffer basis, maybe even based on the buffer size. I don't think I'd want to default the package to that though, as that would feel arbitrary and random to users.
@sulami , sorry it has been a while since I look into this but I like your idea of activating it when the buffer size is below a given value. My lisp skill is not good but I tried the below code and it is not working. Can you help me with this? or even add it as a function to so people can specify the maximum buffer size to automatically call the mode?
(if (and (<= (buffer-size) 1500) (eq (buffer-mode) 'org-mode)) (setq literate-calc-minor-mode 1))
from literate-calc-mode.el.
Thanks for this update @sulami. It works great
from literate-calc-mode.el.
Related Issues (20)
- [Feature Request] Have => trigger a calculation parse from previous = sign even if spans multiple lines HOT 1
- Warning during byte compiling
- Wishes Really HOT 6
- Comparison with embedded calc mode? HOT 1
- function names collide with variable names HOT 3
- literate-calc-remove-results not working with negative results HOT 3
- Lisp error during org export HOT 2
- Debugger entered--Lisp error: (wrong-type-argument timerp nil)
- Exporting results HOT 2
- Lists HOT 1
- Vectors, lists and multiline summations HOT 1
- Thousand Separator HOT 2
- The calculation oder is wrong HOT 3
- Units convertion HOT 3
- Custom variable to set default Radix format, ability to change buffer local radix output HOT 1
- Polymode for literate-calc HOT 3
- function problem HOT 2
- Enhancements
- Bug in literate-calc-minor-mode save-match-data HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from literate-calc-mode.el.