Hello, Thierry Banel <tbanelweb...@free.fr> 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