org-odt.el: Fix performance issue on manifest file writing
commit2ded8ccb8505961687dd7c5ba025e0ebed5bb89b
authorJambunathan K <kjambunathan@gmail.com>
Thu, 24 Nov 2011 18:16:34 +0000 (24 23:46 +0530)
committerJambunathan K <kjambunathan@gmail.com>
Thu, 24 Nov 2011 18:16:57 +0000 (24 23:46 +0530)
treefd03003083af910ac4cbed9731d33266533b9a09
parent5a24ffe004bacac719f4753c6f9b801e6e15fcd9
org-odt.el: Fix performance issue on manifest file writing

* contrib/lisp/org-odt.el (org-odt-write-manifest-file): Don't
use write-region.

The org-odt-write-manifest-file function take too much time -
several seconds for 164 files. This patch provides a cheaper
implementation (hundredths of a seconds for 164 files).

Original patch by Jérémy Compostella
<jeremy.compostella@gmail.com>.  Rewritten by Jambunathan K to
minimize the actual number of lines changed.

TINYCHANGE.

From http://www.mail-archive.com/emacs-orgmode@gnu.org/msg49248.html
I'm currently generating a road book for a trip from different
Org-Mode file and other data. It results in a 13 thousands
lines Org-Mode file and I have some performance issues. Using
the ELP package, I isolated the two main bottlenecks.

One is in org-odt : the org-odt-write-manifest-file function
is called once and takes 5.546672 seconds to write a 167 lines
file. I rewrote this function and now it takes 0.01606 seconds
to write the same file.
contrib/lisp/org-odt.el