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: Grant Rettke
Subject: Re: [O] long code blocks making Org Mode very slow
Date: Tue, 21 Jul 2015 20:20:09 -0500

When I have the cursor inside of the code block for the code, moving
up or done one line or one page takes 2-3 seconds.
Grant Rettke
--
address@hidden | 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 Tue, Jul 21, 2015 at 6:09 AM, Angus M <address@hidden> wrote:
>> 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!



reply via email to

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