Messages in this thread | | | Date | Wed, 30 Oct 2013 04:14:14 +0100 | From | Michael Opdenacker <> | Subject | Re: [PATCH] scripts/checkkconfig.py: find unused Kconfig parameters |
| |
Hi Yann,
Thank you for your review!
On 10/29/2013 07:06 PM, Yann E. MORIN wrote:
> I guess all these grep spawning are what makes it slow. > > I wonder if it would not be possible to invert the loop (in pseudo > Python code): > > for f in all_interesting_files: > read f in memory > for s in all_symbols: > if symbol is in f: > remove f from all_symbols > break the inner-most loop You probably meant "remove s from all_symbols", but I got it. > > This way: > - you scan the tree only once > - as soon as a symbol is matched, it is removed, thus decreasing > the amount of checks done in further loops. This sounds like a very good idea, thanks! I hope to have time to implement a mix of it and Michal's proposal later this week, or at least next week.
Thanks again,
Michael.
-- Michael Opdenacker, CEO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com +33 484 258 098
| |