emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] long code blocks making Org Mode very slow


From: Nick Dokos
Subject: Re: [O] long code blocks making Org Mode very slow
Date: Tue, 14 Jul 2015 17:44:54 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Angus M <address@hidden> writes:

> I'm trying to run a long Python code block (~4000 lines) in org mode.  The
> code is sandwiched between:
> #+begin_src python
> <python code block>
> #+end_src
>
> It runs fine, but org mode becomes incredibly slow - when typing text there
> is about a 10 second delay before the character appears on the screen.  If I
> reduce the number of lines of code in the block there is a noticeable
> increase in speed.
>

That's because a) emacs is single-threaded and b) babel blocks are
executed synchronously. emacs waits for the code block to finish
executing before going on with its business.

See e.g. the thread at

http://article.gmane.org/gmane.emacs.orgmode/83704

> I am not using line numbers, and the delay is not ameliorated by turning off
> fontification.
>
> If I add a semi-colon before #+begin_src, to comment it off (get rid of src
> environment), then org mode returns to it's normal speed.
>
> Do I just have to accept that long code blocks can't be entered into Org 
> Mode?  
>

Now I'm confused: are you executing the code block or aren't you?

IIUC, code blocks can be of arbitrary length: but if you try to run one, you
gotta wait till it finishes. Is that what you are complaining about or
do you see something else?

> Any help would be appreciated.  I am running Org Mode (version 8.2.10) on
> Windows 8.
>

Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]