emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Emacs hangs while loading .org file
@ 2016-08-17 16:19 David Dynerman
  2016-08-17 17:14 ` Nick Dokos
  0 siblings, 1 reply; 2+ messages in thread
From: David Dynerman @ 2016-08-17 16:19 UTC (permalink / raw)
  To: emacs-orgmode

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Emacs hangs while loading .org file
  2016-08-17 16:19 Emacs hangs while loading .org file David Dynerman
@ 2016-08-17 17:14 ` Nick Dokos
  0 siblings, 0 replies; 2+ messages in thread
From: Nick Dokos @ 2016-08-17 17:14 UTC (permalink / raw)
  To: emacs-orgmode

David Dynerman <david@block-party.net> 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-08-17 17:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-17 16:19 Emacs hangs while loading .org file David Dynerman
2016-08-17 17:14 ` Nick Dokos

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).