emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* htmlize slows org export down?
@ 2009-06-13 20:33 Stefan Vollmar
  2009-06-14  6:09 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Stefan Vollmar @ 2009-06-13 20:33 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I am currently writing a tutorial on Python for beginners, and I have  
numerous paragraphs like this:

#+BEGIN_SRC python
from xturtle import *
...
raw_input()
#+END_SRC

Using version 1.36 of htmlize.el (already compiled) this will be  
rendered beautifully when exporting to HTML. However, it seems that  
each of these SRC-blocks with syntax highlighting slows the export  
down considerably. OK - the whole export still takes less than 5  
seconds (yes, I know...) - but it is so much faster without the syntax  
highlighting (and 5 seconds is a long time for a modern machine). Is  
there a way to speed this up? Split the document? Use some sort of  
caching?

Many thanks in advance.
Warm regards,
  Stefan
-- 
Dr. Stefan Vollmar, Dipl.-Phys.
Max-Planck-Institut für neurologische Forschung
Gleuelerstr. 50, 50931 Köln, Germany
Tel.: +49-221-4726-213  FAX +49-221-4726-298
Tel.: +49-221-478-5713  Mobile: 0160-93874279
Email: vollmar@nf.mpg.de   http://www.nf.mpg.de

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

* Re: htmlize slows org export down?
  2009-06-13 20:33 htmlize slows org export down? Stefan Vollmar
@ 2009-06-14  6:09 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-06-14  6:09 UTC (permalink / raw)
  To: Stefan Vollmar; +Cc: emacs-orgmode


On Jun 13, 2009, at 10:33 PM, Stefan Vollmar wrote:

> Hello,
>
> I am currently writing a tutorial on Python for beginners, and I  
> have numerous paragraphs like this:
>
> #+BEGIN_SRC python
> from xturtle import *
> ...
> raw_input()
> #+END_SRC
>
> Using version 1.36 of htmlize.el (already compiled) this will be  
> rendered beautifully when exporting to HTML. However, it seems that  
> each of these SRC-blocks with syntax highlighting slows the export  
> down considerably. OK - the whole export still takes less than 5  
> seconds (yes, I know...) - but it is so much faster without the  
> syntax highlighting (and 5 seconds is a long time for a modern  
> machine).

Yes, this can be slow.

> Is there a way to speed this up? Split the document? Use some sort  
> of caching?

I don't know a real way to speed this up.  But you could use

C-u C-u C-c C-e h

to have a background process doing the exporting

Or you could develop the document using begin_example, and
then switch to _src only when it is ready.  You can even write

#+begin_example python

to make the conversion easier.  Or use a function
in org-export-preprocess-hook
to turn all the src block into example blocks, and
remove that hook only when you are done.

- Carsten

>
> Many thanks in advance.
> Warm regards,
> Stefan
> -- 
> Dr. Stefan Vollmar, Dipl.-Phys.
> Max-Planck-Institut für neurologische Forschung
> Gleuelerstr. 50, 50931 Köln, Germany
> Tel.: +49-221-4726-213  FAX +49-221-4726-298
> Tel.: +49-221-478-5713  Mobile: 0160-93874279
> Email: vollmar@nf.mpg.de   http://www.nf.mpg.de
>
>
>
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

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

end of thread, other threads:[~2009-06-14  6:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-13 20:33 htmlize slows org export down? Stefan Vollmar
2009-06-14  6:09 ` Carsten Dominik

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).