Re: fts: avoid O(n^2) ext3/ext4 performance hit on million+-entry dirs

2008-09-25 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Jim Meyering wrote: >> +if (nitems > _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD >> +&& !sp->fts_compar >> +&& dirent_inode_sort_may_be_useful (sp)) { >> +sp->fts_compar = fts_compare_ino; >> +head = fts_sort (sp, head,

Re: Friendlier gnulib-tool error messages with multiple incompatible modules

2008-09-25 Thread Derek Price
Bruno Haible wrote: >> +func_wrap () >> +{ >> + prefix=$2 >> + plen=`echo "$prefix" |wc -c` >> + if test -z "$3"; then >> +len=80 >> + fi >> + len=`expr $len - $plen` >> + echo "$1" |sed -e "s#.\\{1,$len\\} #&\\n$prefix#g" -e "s#^#$prefix&#" >> +} > > This is an interesting use of 'sed'

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: >> +EXTRA_DIST += m4/gnulib-cache.m4 >> >> AM_CPPFLAGS = >> >> >> As you can see, the EXTRA_DIST contains the wrong path: it should be >> gl/m4/gnulib-cache.m4. > > No, it is correct. File names in gl/Makefile.am are supposed to be relative > to the g

Re: Friendlier gnulib-tool error messages with multiple incompatible modules

2008-09-25 Thread Bruno Haible
Hi Derek, > Anyone mind if I commit the attached patch? It makes `gnulib-tool > --update --lgpl' list all incompatible modules instead of breaking after > the first one This use-case is not very convincing, because 1) gnulib-tool is not documented to accept the option --lgpl together with

Re: fts: avoid O(n^2) ext3/ext4 performance hit on million+-entry dirs

2008-09-25 Thread Bruno Haible
Jim Meyering wrote: > + if (nitems > _FTS_INODE_SORT_DIR_ENTRIES_THRESHOLD > + && !sp->fts_compar > + && dirent_inode_sort_may_be_useful (sp)) { > + sp->fts_compar = fts_compare_ino; > + head = fts_sort (sp, head, nitems); > + sp->fts_compar =

Re: Friendlier gnulib-tool error messages with multiple incompatible modules

2008-09-25 Thread Derek Price
Ralf Wildenhues wrote: > * Derek Price wrote on Thu, Sep 25, 2008 at 05:10:31PM CEST: >> --- gnulib-tool revision 1.307 >> +++ gnulib-tool working copy > >> +func_push () >> +{ >> + var=$1 >> + shift >> + for e; do > > The more portable way really is > for e > do > > not > for e; do Ok

Re: fts: avoid O(n^2) ext3/ext4 performance hit on million+-entry dirs

2008-09-25 Thread Jim Meyering
Ralf Wildenhues <[EMAIL PROTECTED]> wrote: > * Jim Meyering wrote on Thu, Sep 25, 2008 at 06:16:58PM CEST: >> --- a/lib/fts.c >> +++ b/lib/fts.c > >> +/* A comparison function to sort on increasing inode number. >> + For some file system types, sorting either way makes a huge >> + performance d

Re: fts: avoid O(n^2) ext3/ext4 performance hit on million+-entry dirs

2008-09-25 Thread Ralf Wildenhues
Hi Jim, * Jim Meyering wrote on Thu, Sep 25, 2008 at 06:16:58PM CEST: > --- a/lib/fts.c > +++ b/lib/fts.c > +/* A comparison function to sort on increasing inode number. > + For some file system types, sorting either way makes a huge > + performance difference for a directory with very many e

Re: Friendlier gnulib-tool error messages with multiple incompatible modules

2008-09-25 Thread Ralf Wildenhues
* Derek Price wrote on Thu, Sep 25, 2008 at 05:10:31PM CEST: > --- gnulib-tool revision 1.307 > +++ gnulib-tool working copy > +func_push () > +{ > + var=$1 > + shift > + for e; do The more portable way really is for e do not for e; do sorry for not stating that clearly the first time.

fts: avoid O(n^2) ext3/ext4 performance hit on million+-entry dirs

2008-09-25 Thread Jim Meyering
Hello, Here is a patch that makes it so tools using fts, like chmod, chown, chgrp, chcon, du, and find are no longer susceptible to an O(n^2) performance penalty when processing very large directory-entry counts (as in millions). I first noticed the problem on ext3 and ext4 file systems, but the p

Re: Friendlier gnulib-tool error messages with multiple incompatible modules

2008-09-25 Thread Derek Price
Ralf Wildenhues wrote: > a couple of nits, if I may: The attached patch addresses all of Ralf's nits, fixes a few minor bugs, and contains a few additional simplifications of the new functions. Any objections? Regards, Derek -- Derek R. Price Solutions Architect Ximbiot, LLC

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Yoann Vandoorselaere
Le jeudi 25 septembre 2008 à 12:55 +0200, Ralf Wildenhues a écrit : > * Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: > > > > > - After generating the autotools build system, doing 'make check' will > > > result in the following error (only when cross compiling for Win32 > > > syste

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Bruno Haible
Oops, the patch that I committed worked right in the second run, but not in the first run. Fixed: 2008-09-25 Bruno Haible <[EMAIL PROTECTED]> * gnulib-tool (func_import): When computing the edits, consider not only the Makefile.ams that exist but also those that will be generate

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Bruno Haible
Simon Josefsson wrote: > It doesn't work fully, in libidn doing a --import with the new > gnulib-tool results in a diff: > > @@ -9,10 +9,11 @@ > # the same distribution terms as the rest of that program. > # > # Generated by gnulib-tool. > -# Reproduce by: gnulib-tool --import --dir=. --local-d

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Simon Josefsson
Bruno Haible <[EMAIL PROTECTED]> writes: >> - Then editing libmissing/Makefile.am by hand to list the "tests" >> directory as SUBDIRS (shouldn't this be handled automatically?). > > Right, it should be handled automatically. Currently gnulib-tool is asking > the user to make a change to a file tha

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Ralf Wildenhues
* Bruno Haible wrote on Thu, Sep 25, 2008 at 02:42:39PM CEST: > > `/home/yoann/dev/prelude/git/libprelude/libmissing/tests' > > i586-mingw32msvc-gcc -std=gnu99 -g -O2test-alloca-opt.c -o > > test-alloca-opt > > test-alloca-opt.c:19:20: error: config.h: No such file or directory > > test-alloc

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Bruno Haible
Hi Yoann, > The --tests-base argument is not saved within gnulib-cache.m4. The > attached patch fixes this issue. It is saved, but only as argument of gl_TESTS_BASE, not in the comment. I have applied your patch. > Additionally, I'm running into another problem when cross compiling for > Win32 s

[PATCH] modules/sys_select-tests (Depends-on): Remove sys_select.

2008-09-25 Thread Simon Josefsson
Pushed. /Simon --- ChangeLog|5 + modules/sys_select-tests |1 - 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3a1f2c4..8098603 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-25 Simon Josefsson <[EMAIL PR

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Simon Josefsson
Ralf Wildenhues <[EMAIL PROTECTED]> writes: > * Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: >> >> > - After generating the autotools build system, doing 'make check' will >> > result in the following error (only when cross compiling for Win32 >> > systems): >> >> "make check" do

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Paolo Bonzini
Ralf Wildenhues wrote: > * Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: >>> - After generating the autotools build system, doing 'make check' will >>> result in the following error (only when cross compiling for Win32 >>> systems): >> "make check" does not work for Windows crosses b

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Ralf Wildenhues
* Paolo Bonzini wrote on Thu, Sep 25, 2008 at 12:43:05PM CEST: > > > - After generating the autotools build system, doing 'make check' will > > result in the following error (only when cross compiling for Win32 > > systems): > > "make check" does not work for Windows crosses because check-TESTS >

Re: [PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Paolo Bonzini
> - After generating the autotools build system, doing 'make check' will > result in the following error (only when cross compiling for Win32 > systems): "make check" does not work for Windows crosses because check-TESTS depends on $(TESTS), which includes "test-allocaopt". So make attempts to m

[PATCH]: Missing tests-base in gnulib-cache.m4

2008-09-25 Thread Yoann Vandoorselaere
Hi, The --tests-base argument is not saved within gnulib-cache.m4. The attached patch fixes this issue. Additionally, I'm running into another problem when cross compiling for Win32 systems: - Importing GnuLib file using the following command: ../gnulib/gnulib-tool --import --dir=. --lib=libmis