[asterisk-dev] slow slow menuselect (and proposal for a fix)
Tzafrir Cohen
tzafrir.cohen at xorcom.com
Sat Dec 15 09:08:05 CST 2007
On Sat, Dec 15, 2007 at 06:33:13AM -0800, Luigi Rizzo wrote:
> I experienced recently that menuselect and related processing is
> taking a long long time on certain platforms, particularly if you
> are using network-mounted filesystems, so investigated a bit the
> problem.
>
> 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.
>
> Remember we have over 300 files and 310k lines of C code now in the tree,
> which are not a problem on a fast modern machine with a fast local
> disk and large disk cache. Take one of these features away and
> you'll see a huge difference.
>
> The attempt to put in the same file (the .c source) code, documentation
> and build dependencies is commendable. But in my opinion it is completely
> unreasonable that we have to process 300 files and 310k lines of code
> every time we run 'make', only to collect the 1000 or so lines
> that we care about (and find that they are unchanged).
>
> I see two steps to remove this inefficiency:
>
> 1. (simple): remove the dependency on menuselect.makeopts from a number
> of targets, introducing it only as a dependency for makeopts
>
> 2. (slightly harder): remove the MODULEINFO and MAKEOPTS sections
> from foo.c source files, and put them somewhere else, either
> in some foo.opts files that go along with them, and/or in a central
> place for each directory
3. extracting the information at ./configure time rather than at 'make'
time.
(2) breaks the option to just drop a file into the build tree and get it
built.
--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
More information about the asterisk-dev
mailing list