[asterisk-dev] slow slow menuselect (and proposal for a fix)
Luigi Rizzo
rizzo at icir.org
Mon Dec 17 03:11:50 CST 2007
On Sun, Dec 16, 2007 at 10:43:22PM -0800, Kevin P. Fleming wrote:
> Luigi Rizzo wrote:
>
> (note that I have already committed a fix for the problems outlined
> here, just finally got a chance to respond... see below)
>
> > The reason seems to be that, if i am not mistaken, menuselect itself
> > does a full pass on the entire set of sources to check dependencies.
> > There is a second full pass, with awk being run on each source file
> > while making up menuselect-tree. This seems to happen every time
> > I run 'make' in the top level, even without any change in the
> > sources.
>
> Actually, this is not quite true. menuselect itself is not aware of the
> source files at all, it is fed all the information it needs via the
> menuselect-tree file and some other input files.
>
> What you are seeing is the prep_moduledeps script in build_tools, which
> uses awk twice to get the MODINFO and MAKEOPTS blocks from the file, and
> grep once to get the file's description from the AST_MODULE_INFO macro
> call. Unfortunately this latter option requires scanning the entire file
> since the macro call is always at the end of the file.
>
> It should not be happening every time you run 'make'... if you are
> seeing the 'Generating input for menuselect...' output every time you
> run a normal 'make', then something is wrong on your system and make
> cannot tell what files need to be rebuilt due to dependencies having
> changed.
i think this was actually due to menuselect.makeopts being
listed as a .PHONY target, but i realised it after my posting
and after a few runs of "gmake --debug=b"
> Please review the changes I've already committed; on my laptop, changing
will do - thanks a lot for addressing the problem
cheers
luigi
More information about the asterisk-dev
mailing list