Hi, I noticed that make test became extremely slow recently. The first bottleneck can be seen in make BTEST_RE="^test-org-cite/adjust-note" test passed 1/1 test-org-cite/adjust-note (12.321278 sec) The test takes 12sec! Moreover, subsequent tests (even not related to org-cite) become slower, presumably because we overuse Emacs memory. I am not using org-cite much myself, but I imagine that ordinary users may also suffer from a similar performance issues after multiple exports. The profiler report shows that org-cite-get-processor may be the cause: 5794 91% - ert-run-test 5794 91% - ert--run-test-internal 5794 91% - #<lambda 0x5c69d99ea013bd4> 4813 75% - let 4813 75% - let* 4813 75% - condition-case 4813 75% - let 4813 75% - list 4813 75% - cons 4813 75% - mapcar 516 8% - #<lambda -0xebdf3f4ac8552e7> 516 8% + test-org-cite--export-with-rule 497 7% - #<lambda -0xebde86ea74e52e7> 497 7% + test-org-cite--export-with-rule 417 6% - #<lambda -0xebdf3f4b1fe52e7> 417 6% + test-org-cite--export-with-rule 398 6% - #<lambda -0xebdfc57f09452e7> 398 6% + test-org-cite--export-with-rule 397 6% - #<lambda -0xebde86e9e4b52e7> 397 6% + test-org-cite--export-with-rule 393 6% - #<lambda -0xebdfc57ded652e7> 393 6% + test-org-cite--export-with-rule 389 6% - #<lambda -0xebdce06d12652e7> 389 6% + test-org-cite--export-with-rule 377 5% - #<lambda -0xebde86e96a852e7> 377 5% + test-org-cite--export-with-rule 377 5% - #<lambda -0xebde86e989552e7> 377 5% + test-org-cite--export-with-rule 368 5% - #<lambda -0xebdfc57f3d952e7> 368 5% + test-org-cite--export-with-rule 347 5% - #<lambda -0xebdce06cb7d52e7> 347 5% + test-org-cite--export-with-rule 337 5% - #<lambda -0xebdfc57f51352e7> 337 5% + test-org-cite--export-with-rule 981 15% - let* 981 15% - condition-case 981 15% - let 981 15% - list 981 15% - test-org-cite--export-with-rule 981 15% - let 981 15% - let 981 15% - save-current-buffer 981 15% - unwind-protect 981 15% - progn 942 14% - let 942 14% - let 942 14% - org-trim 942 14% - org-export-as 398 6% - org-cite-store-export-processor 224 3% - org-cite-processor-has-capability-p 224 3% org-cite-get-processor 174 2% org-cite-get-processor 232 3% - org-cite-finalize-export 232 3% org-cite-get-processor 214 3% - org-cite-process-citations 214 3% - org-cite-export-citation 214 3% org-cite-get-processor 30 0% + org-export-copy-buffer 29 0% + org-babel-exp-process-buffer 20 0% + run-hook-with-args 10 0% org-set-regexps-and-options 9 0% + org-export-data 20 0% + org-mode 19 0% + font-lock-ensure 62 0% + #<compiled -0x15985ab8cfaa100a> 20 0% + #<compiled 0x1ebe2226a11f1053> Best, Ihor
Hello,
Ihor Radchenko <yantar92@gmail.com> writes:
> I noticed that make test became extremely slow recently.
> The first bottleneck can be seen in
>
> make BTEST_RE="^test-org-cite/adjust-note" test
>
> passed 1/1 test-org-cite/adjust-note (12.321278 sec)
>
> The test takes 12sec!
Fixed. Thank you.
Regards,
--
Nicolas Goaziou
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>> I noticed that make test became extremely slow recently.
>> The first bottleneck can be seen in
>>
>> make BTEST_RE="^test-org-cite/adjust-note" test
>>
>> passed 1/1 test-org-cite/adjust-note (12.321278 sec)
>>
>> The test takes 12sec!
>
> Fixed. Thank you.
Sorry, but tests are still slow for me after the update.
If I run the test from inside Emacs with ert, things got better, but
make BTEST_RE="^test-org-cite/adjust-note" test
still takes 12sec.
Best,
Ihor
Hello,
Ihor Radchenko <yantar92@gmail.com> writes:
> Sorry, but tests are still slow for me after the update.
> If I run the test from inside Emacs with ert, things got better, but
> make BTEST_RE="^test-org-cite/adjust-note" test
> still takes 12sec.
I cannot reproduce it. The test went down from 4.5s to 1.5s. I am using
Emacs 27.2.
Regards,
--
Nicolas Goaziou
[-- Attachment #1: Type: text/plain, Size: 1007 bytes --] On Sun, Dec 5, 2021 at 4:12 AM Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote: > Hello, > > Ihor Radchenko <yantar92@gmail.com> writes: > > > Sorry, but tests are still slow for me after the update. > > If I run the test from inside Emacs with ert, things got better, but > > make BTEST_RE="^test-org-cite/adjust-note" test > > still takes 12sec. > > I cannot reproduce it. The test went down from 4.5s to 1.5s. I am using > Emacs 27.2. > Ihor, FWIW, the tests runs in about the same time for me. Running 1 tests (2021-12-06 08:59:31-0500, selector ‘"^test-org-cite/adjust-note"’) passed 1/1 test-org-cite/adjust-note (1.333928 sec) I just rebuild Org from main branch and I am on emacs-28 branch built last Friday: Emacs version: GNU Emacs 28.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.12) of 2021-12-03, built using commit 7282e492d5c3ed8c856d92a121d143f6a70db244. Maybe strace would help identify a disk IO issue if any? [-- Attachment #2: Type: text/html, Size: 1540 bytes --]
Kaushal Modi <kaushal.modi@gmail.com> writes:
> FWIW, the tests runs in about the same time for me.
>
> Running 1 tests (2021-12-06 08:59:31-0500, selector
> ‘"^test-org-cite/adjust-note"’)
> passed 1/1 test-org-cite/adjust-note (1.333928 sec)
>
> I just rebuild Org from main branch and I am on emacs-28 branch built last
> Friday:
Thanks for providing the extra data point. I did more research on my
system and figured that the latest problem on my side is by bad. I was
playing with data structure used to store org-element-cache and the
slowdown was a side effect of breaking change in org-persist format
(elisp reader did extremely poorly with the new datastructure).
I confirm that the slowness is resolved on clean system.
Best,
Ihor