Hi Collin, > A while ago I said that I would have a look at optimizing the > --extract-recursive-dependencies option you implemented in gnulib-tool. > Then I forgot about it. > > I've written and pushed the change finally. > > Here was my testing: > > $ time gnulib-tool --extract-recursive-dependents c99 > > extract-recursive-dependents-c99-old > > real 3m53.437s > user 0m41.646s > sys 3m24.750s > $ time gnulib-tool --extract-recursive-dependents c99 > > extract-recursive-dependents-c99-new > > real 0m7.485s > user 0m7.078s > sys 0m0.312s > $ cmp extract-recursive-dependents-c99-old > extract-recursive-dependents-c99-new > $ echo $? > 0
Nice. Very nice! Thank you. Could you please fix the ChangeLog entry (s/dependencies/dependents/)? And I also see a performance regression in one case: $ time ./gnulib-tool --extract-dependents stdlib $ time ./gnulib-tool --extract-dependents stdlib $ time ./gnulib-tool --extract-dependents stdlib Before: ca. 0.2 to 0.25 seconds. AFter: 1.0 seconds. In this case, when there is only a single call to getDependents(), it was apparently faster to use the 'find modules ...' approach, compared to _getAllModules(). Could you please make this case fast again? The way I'm thinking of is to add a boolean argument 'top_level_call' to getDependents(), and pass this argument as true from main.py and as false from everywhere else. Bruno