emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] speeding up Babel Gnuplot


From: Thierry Banel
Subject: Re: [O] speeding up Babel Gnuplot
Date: Tue, 03 Jan 2017 22:40:35 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Here is a patch to avoid generating temporary files multiple times.

There is no way to ensure a single call to
(org-babel-gnuplot-process-vars) without modifying ob-core.el. I don't
want to do that because I would have to change a lot of babel backends.
Thus, I come back to my first light patch.

A 'param' list is passed around. It reflects the #+BEGIN_SRC header. My
patch changes it in-place from:
  (((:var data (3000) (2999) (2998) (2997) ...
to:
  (((:var data . "/tmp/babel-16991kSr/gnuplot-16991YBq") ...

The 'param' list behaves as a cache. There is nothing wrong with that.
The worst thing that can happen is the caching no longer working in case
'param' would be copied some day. Results would stay correct.

Regards,
Thierry


Attachment: 0001-ob-gnuplot-temp-files-generated-only-once.patch
Description: Text Data


reply via email to

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