From: Nick Dokos <ndokos@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: long code blocks making Org Mode very slow
Date: Tue, 14 Jul 2015 17:44:54 -0400 [thread overview]
Message-ID: <87vbdmv2g9.fsf@alphaville.usersys.redhat.com> (raw)
In-Reply-To: loom.20150714T200131-993@post.gmane.org
Angus M <anguscmelville@gmail.com> 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
next prev parent reply other threads:[~2015-07-14 21:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-14 18:15 long code blocks making Org Mode very slow Angus M
2015-07-14 19:41 ` Sebastien Vauban
2015-07-14 21:06 ` Angus M
2015-07-14 21:44 ` Nick Dokos [this message]
2015-07-14 23:39 ` Angus M
2015-07-15 12:22 ` Angus M
2015-07-17 1:10 ` Grant Rettke
2015-07-21 11:09 ` Angus M
2015-07-22 1:20 ` Grant Rettke
2015-07-22 10:09 ` Angus M
2015-07-22 12:41 ` Nick Dokos
2015-07-22 23:09 ` Grant Rettke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87vbdmv2g9.fsf@alphaville.usersys.redhat.com \
--to=ndokos@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.