[Top][All Lists]

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

Re: builds are getting slower?

From: Artur Malabarba
Subject: Re: builds are getting slower?
Date: Wed, 16 Dec 2015 11:50:11 +0000

On 15 Dec 2015 4:15 pm, "Eli Zaretskii" <address@hidden> wrote:
> Maybe I'm reading the code wrongly, but it looks like even before the
> cache could kick in, dir-locals-find-file calls
> locate-dominating-file, passing it dir-locals--all-files as its
> predicate.  This has 2 effects: (a) it loads "seq", and (b) it calls
> file-expand-wildcards, which needs to read the entire directory and
> then match each file against a regexp.
> Could these be the cause of slowdown?

Probably. And no, You're not reading it wrong.
We need to locate the dir locals file(s) in order to compare its timestamp to the cache. Do we have a faster way of expanding wildcards?

Maybe it would be faster to not allow wildcards at all, and just have a fixed regexp that we use in directory-files.

If that doesn't help, then we could also forgo of the regexp, and just have two allowed filenames (like .dir-locals.el and .dir-locals-2.el).

reply via email to

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