emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eli Qian <eli.q.qian@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Clocking in is pretty slow in version 9.6 when the item has a large
Date: Sun, 4 Dec 2022 20:12:44 +0800	[thread overview]
Message-ID: <CAPW1MRnUNJ6M5MbtTjZ=9sQX6OYg9yJudBg7pVcucoMYxKyGSQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

I use the following method to get the time taken for `org-clocl-in`:
(benchmark 1 '(org-clock-sum (org-clock-get-sum-start)))

In my case, the item has 1400+ entries in its logbook,  clocking in will
cost
1-2s to finish(benchmark results: "Elapsed time: 1.689801s (0.527506s in 7
GCs)"). That's abnormal because it is done very quickly in version
9.5.5.(benchmark result: "Elapsed time: 0.057270s")

After investigation by using profiler, I found the problem is caused by
`org-element-at-point`, which was added to `org-clock-sum` in version 9.6.

Any idea about speeding up clocking in?

[-- Attachment #2: Type: text/html, Size: 676 bytes --]

             reply	other threads:[~2022-12-04 16:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-04 12:12 Eli Qian [this message]
2022-12-04 17:34 ` Clocking in is pretty slow in version 9.6 when the item has a large Mark Barton
2022-12-04 17:41 ` Ihor Radchenko
2022-12-04 17:59   ` [External] : " Daniel Ortmann
2022-12-04 18:18   ` Ihor Radchenko
2022-12-04 18:40     ` Mark Barton
2022-12-07 11:53       ` Ihor Radchenko
2022-12-07 18:28         ` Mark Barton
2022-12-07 18:36           ` Ihor Radchenko
2022-12-07 19:27             ` Mark Barton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPW1MRnUNJ6M5MbtTjZ=9sQX6OYg9yJudBg7pVcucoMYxKyGSQ@mail.gmail.com' \
    --to=eli.q.qian@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).