From: Thierry Banel <tbanelwebmin@free.fr>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: emacs-orgmode@gnu.org
Subject: Re: speeding up Babel Gnuplot
Date: Thu, 05 Jan 2017 21:47:44 +0100 [thread overview]
Message-ID: <586EB0F0.7070400@free.fr> (raw)
In-Reply-To: <87d1g2sba9.fsf@nicolasgoaziou.fr>
Le 04/01/2017 23:36, Nicolas Goaziou a écrit :
>
>> Your proposal provides an additional benefit: caching file generation
>> between several invocations of Babel. (The cache in my patch is intended
>> to be used within a single Babel invocation, and is then garbage
>> collected.). The drawback is that we need to go through all rows of the
>> table, compute the hash, just to discover that the hash was already
>> known. The purpose of the cache was precisely to avoid going through the
>> table again.
> I'm not sure to understand.
>
> I suggest to compute the hash of VAL before it is sent through
> `org-babel-gnuplot-table-to-data', i.e., before `orgtbl-to-generic' is
> called. There's no "going through the table" involved, is it?
>
>
I have the same understanding.
The table is recorded in the `params' parameter in a structure similar to this:
(((:var data (row1..) (row2..) (row3..) (row4..) ...
By "going through the table" I mean going through this structure. Remember the issue in the first place was a slow conversion of this huge structure into a temporary file. Now we need to convert this huge structure into a hash. Ok, let us assume hashing is faster than writing to disk.
Now, what do we do with this hash? Were do we record it? The obvious answer is: we record it in the name of the temporary file. Then, before generating a file we compute the hash and see if there is already a temporary file with this hash in its name.
It is heavier than my proposed `param' cache, but it provides an additional memory between two Babel invocations. I'm fine with that. It solves the issue. If we really need the additional feature (memory between two invocations), let's begin working on it.
next prev parent reply other threads:[~2017-01-05 20:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-28 20:33 speeding up Babel Gnuplot Thierry Banel
2016-12-29 20:04 ` Nicolas Goaziou
2016-12-29 20:34 ` Thierry Banel
2017-01-01 20:17 ` Thierry Banel
2017-01-01 23:34 ` Nicolas Goaziou
2017-01-02 20:11 ` Thierry Banel
2017-01-03 21:40 ` Thierry Banel
2017-01-03 21:55 ` Nicolas Goaziou
2017-01-03 23:06 ` Thierry Banel
2017-01-04 22:36 ` Nicolas Goaziou
2017-01-05 20:47 ` Thierry Banel [this message]
2017-01-06 9:41 ` Nicolas Goaziou
2017-01-06 18:24 ` Thierry Banel
2017-01-04 17:32 ` Achim Gratz
2017-01-04 20:29 ` Thierry Banel
2017-01-04 23:15 ` Charles C. Berry
2017-01-05 20:23 ` Thierry Banel
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
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=586EB0F0.7070400@free.fr \
--to=tbanelwebmin@free.fr \
--cc=emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/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 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).