Re: [O] M-RET slow
Hi Bastien, On 4/27/13, Bastien b...@altern.org wrote: Samuel Wales samolog...@gmail.com writes: If I run it using M-:, it is fast. If I run it using a key binding, it is a bit slow (about 1s). Then this is about `org-meta-return', not `org-insert-heading'. What is the value of `org-catch-invisible-edits' in your config? It's about the same speed with 'smart (what I had) and nil (what I have now). Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Re: [O] M-RET slow
Hi Samuel, Samuel Wales samolog...@gmail.com writes: If I run it using M-:, it is fast. If I run it using a key binding, it is a bit slow (about 1s). Then this is about `org-meta-return', not `org-insert-heading'. What is the value of `org-catch-invisible-edits' in your config? -- Bastien
Re: [O] M-RET slow
Hi Nicolas, On 4/26/13, Nicolas Goaziou n.goaz...@gmail.com wrote: I pushed a speed-up for `org-insert-heading'. Is it speed acceptable now? If I run it using M-:, it is fast. If I run it using a key binding, it is a bit slow (about 1s). C-RET is fast using a key binding. So perhaps there is some interaction with hooks? Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it.
Re: [O] M-RET slow
Hi Samuel, Samuel Wales samolog...@gmail.com writes: In recent git, M-RET takes a few seconds before it does anything. I wonder what sophisticated calculation it is doing? :) You can debug the function C-h f org-insert-heading RET then jump on its definition and M-x edebug-defun RET at the end to follow what it does. A few seconds is not acceptable, unless you managed to install Emacs on a PDP-1. :) -- Bastien
Re: [O] M-RET slow
Hello, Bastien b...@gnu.org writes: Hi Samuel, Samuel Wales samolog...@gmail.com writes: In recent git, M-RET takes a few seconds before it does anything. I wonder what sophisticated calculation it is doing? :) You can debug the function C-h f org-insert-heading RET then jump on its definition and M-x edebug-defun RET at the end to follow what it does. A few seconds is not acceptable, unless you managed to install Emacs on a PDP-1. :) I pushed a speed-up for `org-insert-heading'. Is it speed acceptable now? Regards, -- Nicolas Goaziou
Re: [O] M-RET slow
On 26 apr. 2013, at 16:18, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Bastien b...@gnu.org writes: Hi Samuel, Samuel Wales samolog...@gmail.com writes: In recent git, M-RET takes a few seconds before it does anything. I wonder what sophisticated calculation it is doing? :) You can debug the function C-h f org-insert-heading RET then jump on its definition and M-x edebug-defun RET at the end to follow what it does. A few seconds is not acceptable, unless you managed to install Emacs on a PDP-1. :) I pushed a speed-up for `org-insert-heading'. Is it speed acceptable now? Hi Nicolas, is org-in-item-p slow? - Carsten
Re: [O] M-RET slow
Carsten Dominik carsten.domi...@gmail.com writes: is org-in-item-p slow? It depends on the size of the list -- see for example this problem, where moving an item within a logbook drawer with many items is too slow: http://thread.gmane.org/gmane.emacs.orgmode/66574 -- Bastien
Re: [O] M-RET slow
Hello, Carsten Dominik carsten.domi...@gmail.com writes: is org-in-item-p slow? It is slow, and `org-insert-heading' was calling it (directly or indirectly) four times. Regards, -- Nicolas Goaziou
Re: [O] M-RET slow
Hello, Bastien b...@altern.org writes: Carsten Dominik carsten.domi...@gmail.com writes: is org-in-item-p slow? It depends on the size of the list -- see for example this problem, where moving an item within a logbook drawer with many items is too slow: http://thread.gmane.org/gmane.emacs.orgmode/66574 This is a different issue. `org-move-item-down' doesn't use `org-in-item-p'. The bottleneck here is, without surprise, `org-list-struct', as explained in the comments at the beginning of org-list.el. Regards, -- Nicolas Goaziou
Re: [O] M-RET slow
On 26 apr. 2013, at 16:46, Nicolas Goaziou n.goaz...@gmail.com wrote: Hello, Carsten Dominik carsten.domi...@gmail.com writes: is org-in-item-p slow? It is slow, and `org-insert-heading' was calling it (directly or indirectly) four times. OK, thanks for fixing it. org-insert-heading is up for a rewrite, what a mess :/ - Carsten
Re: [O] M-RET slow
Carsten Dominik carsten.domi...@gmail.com writes: org-insert-heading is up for a rewrite, what a mess :/ And the rewrite should use `org-element-at-point' (once) and have tests for its specifications, like many others interactive core functions. Looks like there so work to be done in the 8.x series ;) Regards, -- Nicolas Goaziou
Re: [O] M-RET slow
Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Bastien b...@altern.org writes: Carsten Dominik carsten.domi...@gmail.com writes: is org-in-item-p slow? It depends on the size of the list -- see for example this problem, where moving an item within a logbook drawer with many items is too slow: http://thread.gmane.org/gmane.emacs.orgmode/66574 This is a different issue. `org-move-item-down' doesn't use `org-in-item-p'. The bottleneck here is, without surprise, `org-list-struct', as explained in the comments at the beginning of org-list.el. I see. `org-at-item-p' is less expensive than `org-in-item-p' but still very expensive as it calls `org-list-in-valid-context-p'. -- Bastien
Re: [O] M-RET slow
Bastien b...@altern.org writes: Hi Nicolas, Nicolas Goaziou n.goaz...@gmail.com writes: Hello, Bastien b...@altern.org writes: Carsten Dominik carsten.domi...@gmail.com writes: is org-in-item-p slow? It depends on the size of the list -- see for example this problem, where moving an item within a logbook drawer with many items is too slow: http://thread.gmane.org/gmane.emacs.orgmode/66574 This is a different issue. `org-move-item-down' doesn't use `org-in-item-p'. The bottleneck here is, without surprise, `org-list-struct', as explained in the comments at the beginning of org-list.el. I see. `org-at-item-p' is less expensive than `org-in-item-p' but still very expensive as it calls `org-list-in-valid-context-p'. very expensive is a bit harsh, at it doesn't depend on the size of the list. Anyway, ultimately, `org-at-item-p' and `org-in-item-p' should be replaced by `org-element-at-point'. Then, all speed-up efforts should concentrate on that function (e.g., caching). Regards, -- Nicolas Goaziou
Re: [O] M-RET slow
Nicolas Goaziou n.goaz...@gmail.com writes: Looks like there so work to be done in the 8.x series ;) Sigh. All the work we did already looks shallow compared to what we have to do... I guess that's just part of the game! -- Bastien
[O] M-RET slow
In recent git, M-RET takes a few seconds before it does anything. I wonder what sophisticated calculation it is doing? :) Samuel -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it.