From: Angus M <anguscmelville@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: long code blocks making Org Mode very slow
Date: Tue, 21 Jul 2015 11:09:39 +0000 (UTC) [thread overview]
Message-ID: <loom.20150721T124634-510@post.gmane.org> (raw)
In-Reply-To: CAAjq1md2j_PBQo0McG7d+wM2r54Jk_Sm259doK7mOAZoDunawg@mail.gmail.com
> Post a Gist of your file so I can try it out.
>
> What is you value of `org-src-fontify-natively'?
> Grant Rettke
> --
> gcr <at> wisdomandwonder.com | http://www.wisdomandwonder.com/
> “Wisdom begins in wonder.” --Socrates
> “All creativity is an extended form of a joke.” --Kay
> ((λ (x) (x x)) (λ (x) (x x)))
> “Life has become immeasurably better since I have been forced to stop
> taking it seriously.” --Thompson
>
> On Wed, Jul 15, 2015 at 7:22 AM, Angus M <anguscmelville <at> gmail.com>
wrote:
> > I've just discovered that the slow-response is definitely related to font
> > locking. If I type M-x font-lock-mode to toggle it off then the typing lag
> > problem is solved.
> >
> > According to the Emacs documentation:
> > 'In Emacs 21 and later, turning on font-lock-mode automatically activates
> > the new Just-In-Time fontification provided by jit-lock-mode.'
> >
> > It would appear, therefore, that just-in-time fontification is not taking
> > place in the code block with the whole code block being fontified at once -
> > and hence the delay.
> >
> > Any help to confirm this hypothesis and how to enable just-in-time
> > fontification in the code block would be appreciated.
> >
> > Angus M
Thanks for your help.
Any script of a significant length sandwiched as a snippet in org mode between:
#+begin_src python
[code]
#+end_src
causes the slow-down.
For example the (arbitrarily chosen) file argparse.py found at
https://code.google.com/p/argparse
/downloads/detail?name=argparse-1.2.1.tar.gz&can=2&q=
is 2400 lines long, and causes a lag of about 1 or 2 seconds for a character
to appear on the screen after a key press.
The issue is not to do with running the script, (which I haven't tried with
this example).
My value for org-src-fontify-natively:
(setq org-src-fontify-natively t)
This issue is of less importance to me now as I think it probably makes
sense to run any script of significant length as a stand-alone 'python mode'
file, which I'm now doing - rather than as a snippet in 'org mode'.
Therefore unless you're curious to solve this problem for its own sake,
please don't invest any significant time on trying to sort it out on my
behalf. Thanks!
next prev parent reply other threads:[~2015-07-21 11:09 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
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 [this message]
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=loom.20150721T124634-510@post.gmane.org \
--to=anguscmelville@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.