From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: Emacs hangs while loading .org file Date: Wed, 17 Aug 2016 13:14:38 -0400 Message-ID: <87y43vuxkx.fsf@alphaville.usersys.redhat.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44742) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba4Qa-0003Ix-E4 for emacs-orgmode@gnu.org; Wed, 17 Aug 2016 13:14:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ba4QW-00069l-7S for emacs-orgmode@gnu.org; Wed, 17 Aug 2016 13:14:55 -0400 Received: from [195.159.176.226] (port=50114 helo=blaine.gmane.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba4QW-00068i-0J for emacs-orgmode@gnu.org; Wed, 17 Aug 2016 13:14:52 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1ba4QP-0008I6-NF for emacs-orgmode@gnu.org; Wed, 17 Aug 2016 19:14:45 +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" To: emacs-orgmode@gnu.org David Dynerman writes: > Dear list, > > I have a fairly large org-file [1] (~2k lines) containing a substantial > amount of code in #+BEGIN_SRC/#+END_SRC blocks. The code is mostly > python, with one or two C blocks. > > Recently emacs has started to hang when loading the file for the first > time. I saved a profiling report [2] where I loaded the file, let emacs > sit unresponsive for about 5 minutes, then typed C-g. > > The report seems to indicate that fontifying python blocks is the > problem - 90% of time is spent in python-nav-end-of-statement. > > Has anyone experienced something like this with large org files > containing python code? The file contains a good chunk of scratch code > which may contain python errors - is it possible that some syntactically > bad python code is causing the fontification to run amok? > > If anyone has suggestions for finding the culprit, I'd be very happy to > hear. > > Thank you, > David > > [1] https://www.math.berkeley.edu/~dynerman/angular_xcorr.org > [2] https://www.math.berkeley.edu/~dynerman/slow-org-load > > Just a data point: I tried loading it: I said "no" to the file local variables question; the file loaded more or less instantly after that. -- Nick