[Top][All Lists]

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

Re: builds are getting slower?

From: Eli Zaretskii
Subject: Re: builds are getting slower?
Date: Tue, 15 Dec 2015 18:15:07 +0200

> Date: Tue, 15 Dec 2015 12:38:07 +0000
> From: Artur Malabarba <address@hidden>
> Cc: Eli Zaretskii <address@hidden>, Paul Eggert <address@hidden>, emacs-devel 
> <address@hidden>
> > On investigation, I find 2e84888 caused a 20% increase in build time.
> >
> Looks like that's my commit. I'm attaching the diff of this commit
> below so that people can have a look and help pinpoint something.
> I only see 2 things that could be to blame:
> 1. dir-locals-find-file changed quite a bit. I suspect it is called
> once for each .el file we compile? In this situation, the local-vars
> cache should kick in and avoid the slowness, but maybe there's a bug
> where the cache is not being used.
> 2. There's a new (require 'map) inside one of the functions and a
> (require 'seq) inside another. (I put these inside the functions so
> that they would only be loaded when necessary, but if it's getting
> loaded at boot, perhaps these should just go at the top level). Anyway
> (require 'seq) could be a bit heavy because it uses cl-generic and
> cl-extra, but I'd be really surprised if this amounted to 20% of the
> build time.

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?

reply via email to

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