[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] speeding up Babel Gnuplot
From: |
Nicolas Goaziou |
Subject: |
Re: [O] speeding up Babel Gnuplot |
Date: |
Mon, 02 Jan 2017 00:34:46 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) |
Hello,
Thierry Banel <address@hidden> writes:
> Babel Gnuplot can be further accelerated. A table is converted to a
> temporary file readable by Gnuplot. I found two issues in this process:
> 1. the temporary file is generated twice,
> 2. the generation is quadratic.
>
> I have not provided a committable patch because I am not happy with myfixes.
>
> Of course there is no hurry in fixing that because large tables do not
> happen so often.
>
> ------------------------------
>
> 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.
> 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.
Regards,
--
Nicolas Goaziou
- Re: [O] speeding up Babel Gnuplot, Thierry Banel, 2017/01/01
- Re: [O] speeding up Babel Gnuplot,
Nicolas Goaziou <=
- Re: [O] speeding up Babel Gnuplot, Thierry Banel, 2017/01/02
- Re: [O] speeding up Babel Gnuplot, Thierry Banel, 2017/01/03
- Re: [O] speeding up Babel Gnuplot, Nicolas Goaziou, 2017/01/03
- Re: [O] speeding up Babel Gnuplot, Thierry Banel, 2017/01/03
- Re: [O] speeding up Babel Gnuplot, Nicolas Goaziou, 2017/01/04
- Re: [O] speeding up Babel Gnuplot, Thierry Banel, 2017/01/05
- Re: [O] speeding up Babel Gnuplot, Nicolas Goaziou, 2017/01/06
- Re: [O] speeding up Babel Gnuplot, Thierry Banel, 2017/01/06
- Re: [O] speeding up Babel Gnuplot, Achim Gratz, 2017/01/04
- Re: [O] speeding up Babel Gnuplot, Thierry Banel, 2017/01/04