From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Dynerman Subject: Emacs hangs while loading .org file Date: Wed, 17 Aug 2016 09:19:54 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33918) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba3Zy-00030b-BS for emacs-orgmode@gnu.org; Wed, 17 Aug 2016 12:20:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ba3Zs-0003sj-Vk for emacs-orgmode@gnu.org; Wed, 17 Aug 2016 12:20:33 -0400 Received: from poitras.block-party.net ([107.170.248.157]:56897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ba3Zs-0003s9-Q4 for emacs-orgmode@gnu.org; Wed, 17 Aug 2016 12:20:28 -0400 Received: from CIVIC-TV.local (airbears2-136-152-142-14.airbears2.berkeley.edu [136.152.142.14]) by poitras.block-party.net (Postfix) with ESMTPSA id 9C1D81204D1 for ; Wed, 17 Aug 2016 09:19:55 -0700 (PDT) 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 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