[Top][All Lists]

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

Re: Automatic (e)tags generation and incremental updates

From: Dmitry Gutov
Subject: Re: Automatic (e)tags generation and incremental updates
Date: Mon, 11 Jan 2021 01:36:35 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 10.01.2021 18:56, Tom Tromey wrote:
Dmitry> - Do we want to store the generated files openly in the root
Dmitry>   directories of each project?

Yeah.  Either way is fine by me, since the projects I work on already
have TAGS in their .gitignore.

One big advantage of this project for me personally would be having users that never got into etags at all (considering it too complicated, for one reason or other), having navigation work automatically OOtB, in multiple languages. Or with a minor mode enabled, at least.

Dmitry> Storing them with "garbled" names somewhere in /tmp of XDG cache
Dmitry> risks having to fully renenerate the indexes at least every time
Dmitry> the machine reboots.

Does anyone really configure their system this way?  XDG warns about
relying on the cache, but in practice I think that is a warning for
developers -- the model being that the user should be able to delete the
cache at any time.  At least on the systems I've used, the cache is
persistent in practice.

I have no idea, actually. Just figured that something like "cache" should be emptied out periodically.

If it usually lives on, we could do away with having a {project -> tags file} alist in memory, serializing it on disk when Emacs is killed.

Dmitry> If general, doing updates when Emacs is idle and/or asynchronously are
Dmitry> quality-of-life changes that can come later after we improve
Dmitry> correctness (i.e. make sure the index is up to date even after
Dmitry> external changes).

Please try it on a non-trivial project before committing to something.
IME a lot of these things work fine for simple projects, but when I want
to use them on gdb or gcc, they are unusably slow.

I have several projects of moderate size (Emacs itself and some work ones, approximately similar) and I regularly try it on a checkout of the Mozilla codebase (which is close to 200K files).

It seems to work all right on the former, and less well on the latter (initial generation takes 10+ seconds; I did optimize subsequent updates for it, but even searching for a single file name in a big enough tags file can take half a second).

I have some projects in the middle (e.g. Ruby is 20K files), but I don't know which sizes are prevalent among our users, or even among folks here. So I'm looking for feedback.

reply via email to

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