emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Gustav Wikström" <gustav@whil.se>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Speedup of org-id-update-id-locations
Date: Wed, 4 Nov 2020 16:10:03 +0000	[thread overview]
Message-ID: <HE1PR0202MB285713870E5169EC5AF5851CDAEF0@HE1PR0202MB2857.eurprd02.prod.outlook.com> (raw)

Hi, A patch is applied to master (commit 19d2f79a0) in order to speed up the rebuilding of ID locations.

Performance testing on my own setup shows a huge reduction in time to rebuild the cache. It goes from 168 seconds to 3 seconds. This performance increase is not to be expected for all operating systems. But for Windows (where Emacs has notorious problems working with the filesystem) this certainly helps!

The rest of this mail is the content of the commit message. 

Kind regards
Gustav

--- Commit 19d2f79a0 ---
Speedup of org-id-update-id-locations

Since this is about performance, a benchmark before this change, on a
set of 519 files with total size of 1500 kb gives the following result:

  519 files scanned, 504 files contains IDs, and 911 IDs found.
  (168.243948 38 2.053949000000003)

After the change the following result:

  519 files scanned, 504 files contains IDs, and 911 IDs found.
  (3.034806 3 0.16445799999999622)

Benchmark done on a a Windows machine with no files previously loaded
into Emacs.

* lisp/org-id.el (org-id-update-id-locations): This function has
gotten a bit of back and forth changes in terms of performance.  One
year ago in 9865e6bd8 and then six months ago in 37a5020bb.
Unfortunately the latest speedup actually was a speed-down.  Speed is
not good again.


                 reply	other threads:[~2020-11-04 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=HE1PR0202MB285713870E5169EC5AF5851CDAEF0@HE1PR0202MB2857.eurprd02.prod.outlook.com \
    --to=gustav@whil.se \
    --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).