emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] spee-up table refresh


From: Thierry Banel
Subject: Re: [O] spee-up table refresh
Date: Mon, 09 Jan 2017 23:27:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Le 09/01/2017 00:24, Nicolas Goaziou a écrit :

> Note that recalculating a table is inherently quadratic.

Well, on the test-case your change made recalculation linear (which is
good):

|  rows | seconds |
|-------+---------|
|  1000 |     1.5 |
| 10000 |      13 |
| 20000 |      25 |
| 30000 |      37 |

>
>> Here is a test case.
>>
>> 1- First create a 1000 row table:
>>
>> #+BEGIN_SRC elisp :results none
>>   (goto-char (point-max))
>>   (let ((i 1000))
>>     (while (> i 0)
>>       (insert (format "| %4s | |\n" i))
>>       (setq i (1- i))))
>>   (insert "#+TBLFM: $2=$1*10\n")
>> #+END_SRC
>>
>> 2- Then, with point in the table, type C-u C-c *
> I limited calls to `org-element-at-point'. It should be much faster now.
> Thank you.
>

And you did so through an impressively light change: swapping two lines
with a test on `suppress-analysis'.

Thanks and regards.
Thierry




reply via email to

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