From: Eli Zaretskii <eliz@gnu.org>
To: Jurgen De Backer <jurgen.de-backer.ext@eurocontrol.int>
Cc: 55636@debbugs.gnu.org, stef.van-vlierberghe@eurocontrol.int,
philippe.waroquiers@eurocontrol.int
Subject: bug#55636: 27.2; etags performance fix when working with very big TAGS files
Date: Wed, 25 May 2022 20:16:27 +0300 [thread overview]
Message-ID: <83r14hpm6s.fsf@gnu.org> (raw)
In-Reply-To: <80qa6b58uq3.fsf@eurocontrol.int> (bug-gnu-emacs@gnu.org)
> Cc: jurgen.de-backer.ext@eurocontrol.int, stef.van-vlierberghe@eurocontrol.int,
> philippe.waroquiers@eurocontrol.int
> Date: Wed, 25 May 2022 16:04:04 +0000
> From: Jurgen De Backer via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>
> We implemented a fix for making etags searching faster in our custom
> emacs build.
> In our project, sometimes a search could take more than 10 seconds.
> The fix is to expand filenames only if they are relative:
>
> (defun expand-if-relative (a-file)
> (if (file-name-absolute-p a-file)
> a-file
> (expand-file-name a-file)
> )
> )
>
> and then use this function in the mapcar statement inside (defun
> tags-table-including ...), replacing expand-file-name:
> ....
> (if (member this-file (mapcar #'expand-if-relative
> (tags-table-files)))
> ;; Found it.
> (setq found tables)
> )
> ....
Thanks. How much speedup does this bring in your use cases? From 10
sec down to how long?
> Looking at expand-file-name doc, it does 2 things:
> * make file name absolute
> * and canonicalize it (removes the xxxx/.. dir components,
> the . dir components, the double slashes).
It actually does more, like resolve the ~/ etc.
> We are wondering if the standard C function in emacs could do
> a fast "do nothing" when the file name is absolute and has
> nothing to cannonicalize.
I think testing for "nothing to canonicalize" is as complex as
canonicalizing the file name.
next prev parent reply other threads:[~2022-05-25 17:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-25 16:04 bug#55636: 27.2; etags performance fix when working with very big TAGS files Jurgen De Backer via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-25 17:16 ` Eli Zaretskii [this message]
2022-05-25 20:42 ` VAN VLIERBERGHE Stef via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-26 5:07 ` Eli Zaretskii
2022-05-26 13:50 ` VAN VLIERBERGHE Stef via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-26 14:54 ` WAROQUIERS Philippe via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-26 15:09 ` Eli Zaretskii
2022-05-26 17:25 ` WAROQUIERS Philippe via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-05-26 19:10 ` Eli Zaretskii
2022-05-26 20:45 ` WAROQUIERS Philippe via Bug reports for GNU Emacs, the Swiss army knife of text editors
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83r14hpm6s.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=55636@debbugs.gnu.org \
--cc=jurgen.de-backer.ext@eurocontrol.int \
--cc=philippe.waroquiers@eurocontrol.int \
--cc=stef.van-vlierberghe@eurocontrol.int \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.