From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: M-RET slow Date: Fri, 26 Apr 2013 17:24:19 +0200 Message-ID: <871u9x71ss.fsf@gmail.com> References: <87fvyd7q3m.fsf@bzg.ath.cx> <87ip3974uj.fsf@gmail.com> <877gjpbbgx.fsf@bzg.ath.cx> <87a9ol73cu.fsf@gmail.com> <87k3nptj1w.fsf@bzg.ath.cx> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59812) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVkVe-0006tx-E8 for emacs-orgmode@gnu.org; Fri, 26 Apr 2013 11:24:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVkVa-0003Hr-Gs for emacs-orgmode@gnu.org; Fri, 26 Apr 2013 11:24:26 -0400 Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:38781) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVkVa-0003Fn-B7 for emacs-orgmode@gnu.org; Fri, 26 Apr 2013 11:24:22 -0400 Received: by mail-wi0-f177.google.com with SMTP id hj19so751656wib.10 for ; Fri, 26 Apr 2013 08:24:21 -0700 (PDT) In-Reply-To: <87k3nptj1w.fsf@bzg.ath.cx> (Bastien's message of "Fri, 26 Apr 2013 17:20:43 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Bastien Cc: emacs-orgmode@gnu.org, Carsten Dominik Bastien writes: > Hi Nicolas, > > Nicolas Goaziou writes: > >> Hello, >> >> Bastien writes: >> >>> Carsten Dominik 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