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