[asterisk-dev] slow slow menuselect (and proposal for a fix)

Tzafrir Cohen tzafrir.cohen at xorcom.com
Sun Dec 16 00:45:34 CST 2007


On Sat, Dec 15, 2007 at 03:33:46PM -0800, Luigi Rizzo wrote:
> On Sat, Dec 15, 2007 at 09:19:53PM +0200, Tzafrir Cohen wrote:
> > On Sat, Dec 15, 2007 at 10:07:32AM -0800, Luigi Rizzo wrote:
> ...
> > If the scanning is too slow, maybe it could be optimized. One way is to
> > replace everything with a perl/python/whatever script. Such a script
> > will not execute multiple binaries mutiple tiomes. Currently for every
> > file there are several invocations of printf and awk.
> > 
> > An obvious optimization is to replace all of that with one perl script.
> > Given that some people would disapprove of adding an extra dependency on
> > perl, here some (g?)awk command to extract the data from all files:
> > 
> > time awk 'FNR==1 {printf "\n\nFilename: %s\n",FILENAME}; /\/\*\*\* MODULEINFO/,/\*\*\*\// {print};' */*.c  >version2
> > 
> > real    0m2.047s
> > user    0m0.892s
> > sys     0m0.044s
> 
> this is not too different from the current code:
> 
> 	> time gmake menuselect-tree
> 	Generating input for menuselect ...
> 	1.353u 2.668s 0:03.32 120.7%    96+226k 5+0io 0pf+0w
> 
> As long as we run it only 'on demand' it is still faster than
> the 'configure' step so there isn't much to optimize here.

Again: an independent script that is also run by configure (because you
must run it before menuselect).

-- 
               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