Re: [PATCH] Speed up fixincludes.

2022-02-04 Thread Marek Polacek via Gcc-patches
On Fri, Feb 04, 2022 at 10:26:07AM +0100, Martin Liška wrote: > On 2/3/22 22:51, Jakub Jelinek wrote: > > On Thu, Feb 03, 2022 at 04:29:39PM -0500, Marek Polacek wrote: > > > On Thu, Feb 03, 2022 at 10:13:36PM +0100, Martin Liška wrote: > > > > On 2/3/22 19:44, Andreas Schwab wrote: > > > > > On Fe

Re: [PATCH] Speed up fixincludes.

2022-02-04 Thread Martin Liška
On 2/3/22 22:51, Jakub Jelinek wrote: On Thu, Feb 03, 2022 at 04:29:39PM -0500, Marek Polacek wrote: On Thu, Feb 03, 2022 at 10:13:36PM +0100, Martin Liška wrote: On 2/3/22 19:44, Andreas Schwab wrote: On Feb 03 2022, Martin Liška wrote: +cd $LIB +echo "$all_dirs" | xargs mkdir -p +cd .. +

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 03, 2022 at 04:29:39PM -0500, Marek Polacek wrote: > On Thu, Feb 03, 2022 at 10:13:36PM +0100, Martin Liška wrote: > > On 2/3/22 19:44, Andreas Schwab wrote: > > > On Feb 03 2022, Martin Liška wrote: > > > > > > > +cd $LIB > > > > +echo "$all_dirs" | xargs mkdir -p > > > > +cd .. > > >

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Marek Polacek via Gcc-patches
On Thu, Feb 03, 2022 at 10:13:36PM +0100, Martin Liška wrote: > On 2/3/22 19:44, Andreas Schwab wrote: > > On Feb 03 2022, Martin Liška wrote: > > > > > +cd $LIB > > > +echo "$all_dirs" | xargs mkdir -p > > > +cd .. > > > + > > > > $LIB always contains slashes. > > > > And what is the problem?

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Martin Liška
On 2/3/22 19:44, Andreas Schwab wrote: On Feb 03 2022, Martin Liška wrote: +cd $LIB +echo "$all_dirs" | xargs mkdir -p +cd .. + $LIB always contains slashes. And what is the problem? You're too brief.. Martin

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 03, 2022 at 10:19:37AM -0700, Jeff Law wrote: > > > Is getconf and expr length sufficiently portable? > > > Can't you use > > > echo "$all_dirs" | xargs mkdir -p > > > instead? > > > > Oh, even better! > Definitely.  I suspect getconf wouldn't have worked across all the hosts we > supp

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Andreas Schwab
On Feb 03 2022, Martin Liška wrote: > +cd $LIB > +echo "$all_dirs" | xargs mkdir -p > +cd .. > + $LIB always contains slashes. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Jeff Law via Gcc-patches
On 2/3/2022 9:21 AM, Martin Liška wrote: On 2/3/22 17:12, Jakub Jelinek wrote: On Thu, Feb 03, 2022 at 04:40:25PM +0100, Martin Liška wrote: --- a/fixincludes/fixinc.in +++ b/fixincludes/fixinc.in @@ -258,12 +258,23 @@ then echo "All directories (including links to directories):"    ec

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Martin Liška
On 2/3/22 17:12, Jakub Jelinek wrote: On Thu, Feb 03, 2022 at 04:40:25PM +0100, Martin Liška wrote: --- a/fixincludes/fixinc.in +++ b/fixincludes/fixinc.in @@ -258,12 +258,23 @@ then echo "All directories (including links to directories):" echo $all_dirs fi -for file in $all_dirs; d

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Jakub Jelinek via Gcc-patches
On Thu, Feb 03, 2022 at 04:40:25PM +0100, Martin Liška wrote: > --- a/fixincludes/fixinc.in > +++ b/fixincludes/fixinc.in > @@ -258,12 +258,23 @@ then echo "All directories (including links to > directories):" > echo $all_dirs > fi > > -for file in $all_dirs; do > - rm -rf $LIB/$file > -

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Andreas Schwab
On Feb 03 2022, Martin Liška wrote: > What do you think now? xargs? -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Martin Liška
On 2/3/22 17:06, Andreas Schwab wrote: On Feb 03 2022, Martin Liška wrote: -mkdir $LIB/root Why did you remote that line? That was an accidental removal, fixed in V2. Martin

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Andreas Schwab
On Feb 03 2022, Martin Liška wrote: > -mkdir $LIB/root Why did you remote that line? -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Martin Liška
On 2/3/22 16:19, Jeff Law wrote: On 2/3/2022 7:56 AM, Martin Liška wrote: In my case: $ rm ./stmp-fixinc ; time make -j16 takes 17 seconds, where I can reduce it easily with the suggested change. Then I get to 11.2 seconds. The scripts searches ~2500 folders in my case with total 20K header

Re: [PATCH] Speed up fixincludes.

2022-02-03 Thread Jeff Law via Gcc-patches
On 2/3/2022 7:56 AM, Martin Liška wrote: In my case: $ rm ./stmp-fixinc ; time make -j16 takes 17 seconds, where I can reduce it easily with the suggested change. Then I get to 11.2 seconds. The scripts searches ~2500 folders in my case with total 20K header files. Ready to be installed? Th