From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: org-element checks make flyspell prohibitively slow Date: Fri, 21 Mar 2014 13:56:56 -0500 Message-ID: <87a9cjnzwn.fsf@fastmail.fm> References: <87zjkolwum.fsf@fastmail.fm> <87siqgcygd.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56739) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR4cx-0004c2-Of for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 14:57:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WR4cq-00005W-Cs for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 14:57:11 -0400 Received: from out1-smtp.messagingengine.com ([66.111.4.25]:34500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WR4cq-000056-4q for emacs-orgmode@gnu.org; Fri, 21 Mar 2014 14:57:04 -0400 In-Reply-To: <87siqgcygd.fsf@gmail.com> (Nicolas Goaziou's message of "Mon, 17 Mar 2014 22:22:26 +0100") 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: Nicolas Goaziou Cc: Emacs-orgmode list Hi Nicolas, Nicolas Goaziou writes: > Matt Lundin writes: > >> The rewrite of org-mode-flyspell-verify in commit >> 4a27c2b4b67201e0b23f431bdaeb6460b31e1394 (Nov 21, 2013) makes navigating >> org-mode files with large chunks of text very slow. > > [...] > >> => Org-mode version 8.2.5h (release_8.2.5h-757-gc444e4 @ >> /home/matt/org-mode/lisp/) > > Could you update and try again? Parser's cache was inadvertently > disabled. I re-enabled it. Yes, I can confirm that it is faster now. Thanks. >> core/acl 2.2.52-2 [installed] >> Access control list utilities, libraries and headers >> core/archlinux-keyring 20140220-1 [installed] >> Arch Linux PGP keyring >> core/attr 2.4.47-1 [installed] >> Extended attribute support library for ACL support >> core/autoconf 2.69-1 (base-devel) [installed] >> A GNU tool for automatically configuring source code >> core/automake 1.14.1-1 (base-devel) [installed] >> A GNU tool for automatically creating Makefiles >> >> All in all, it's 12680 lines.... > > Note that it is a contrived example: the whole buffer is a single > paragraph containing around 150 objects. The current algorithm for > `org-element-context' is clearly not on par with such a density of > objects per paragraph. Yes, it is indeed a contrived example. I originally thought I had a use for it --- i.e., analyzing the packages I had installed --- but soon realized that such a task is better accomplished in a separate text file. > Also, cache cannot help here, because each time you edit a paragraph, > all objects within are removed from the cache (because, AFAIK, there > is no way to know if the edition altered a previously parsed object or > not, so, as a security measure, all of them are wiped out) and you > have to parse them again. > > Therefore, navigation should be fast but editing (with flyspell-mode > enabled) is going to be slow. Good to know. Thanks again! Matt