[Top][All Lists]

[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: Mon, 02 Jan 2017 21:11:07 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Le 02/01/2017 00:34, Nicolas Goaziou a écrit :
> Hello,
> Thierry Banel <address@hidden> writes:
>> 1. Temporary generated twice
>> Because org-babel-gnuplot-process-vars is called twice.
>> There is no obvious fix. Here is a dirty patch. It caches the name of
>> the temporary file in the 'param' list.
> This may not be an issue if `orgtbl-to-generic' is sufficiently fast.

I will look further into that.

>> 2. Quadratic behavior
>> The spot is at ox.el::5119(the lambda in org-export-table-row-number).
>> This lambda is called a number of times equal to the square of thesize
>> of the table being plotted. For a 2000 rows table, this is
>> 2000x2000 = four millions times. The cache a few lines before does
>> nothelp because each row is visited only once.
> Fixed. Thank you.
> I also optimized a bit more `orgtbl-to-generic'. Hopefully, Babel
> Gnuplot should be responsive again of large tables.
Great improvement!
So,filling the org-export-table-row-numbercache at once was the way to go.


reply via email to

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