bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #54860] Less performance of -execdir echo {} +


From: Bernhard Voelker
Subject: [bug #54860] Less performance of -execdir echo {} +
Date: Mon, 22 Oct 2018 16:57:27 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:62.0) Gecko/20100101 Firefox/62.0

Follow-up Comment #5, bug #54860 (project findutils):

Thanks for the tests.
I'm running openSUSE:Tumbleweed, and I'm using ext4.
Maybe the underlying file system returns the information to the
FTS implementation in gnulib in chunks.

With "-execdir CMD '{}' +", you cannot guarantee that only one
process of CMD is spawned ... due to the maximum command line
length, but in such a small directory, the number of processes
should be deterministic, i.e., 1.

Before going on system call level, this is what I get with the
debug options 'exec,search' enabled (this time on a 'tmpfs' in /dev/shm
which obviously doesn't matter):

$ find -D search,exec -iname "*c" -execdir echo '{}' + 2>&1 | grep -E
'dir-2|exec'
consider_visiting (early): './dir-2': fts_info=FTS_D , fts_level= 1,
prev_depth=1 fts_path='./dir-2', fts_accpath='dir-2'
consider_visiting (late): './dir-2': fts_info=FTS_D , isdir=1 ignore=0
have_stat=1 have_type=1 
consider_visiting (early): './dir-2/foo.c': fts_info=FTS_NSOK, fts_level= 2,
prev_depth=1 fts_path='./dir-2/foo.c', fts_accpath='foo.c'
consider_visiting (late): './dir-2/foo.c': fts_info=FTS_NSOK, isdir=0 ignore=0
have_stat=0 have_type=1 
consider_visiting (early): './dir-2/file': fts_info=FTS_NSOK, fts_level= 2,
prev_depth=2 fts_path='./dir-2/file', fts_accpath='file'
consider_visiting (late): './dir-2/file': fts_info=FTS_NSOK, isdir=0 ignore=0
have_stat=0 have_type=1 
consider_visiting (early): './dir-2/another.c': fts_info=FTS_NSOK, fts_level=
2, prev_depth=2 fts_path='./dir-2/another.c', fts_accpath='another.c'
consider_visiting (late): './dir-2/another.c': fts_info=FTS_NSOK, isdir=0
ignore=0 have_stat=0 have_type=1 
consider_visiting (early): './dir-2/dir-5': fts_info=FTS_D , fts_level= 2,
prev_depth=2 fts_path='./dir-2/dir-5', fts_accpath='dir-5'
consider_visiting (late): './dir-2/dir-5': fts_info=FTS_D , isdir=1 ignore=0
have_stat=1 have_type=1 
Outstanding execdirs:-execdir multiple 3 args: echo ./foo.c ./another.c 
consider_visiting (early): './dir-2/dir-5/file': fts_info=FTS_NSOK, fts_level=
3, prev_depth=2 fts_path='./dir-2/dir-5/file', fts_accpath='file'
consider_visiting (late): './dir-2/dir-5/file': fts_info=FTS_NSOK, isdir=0
ignore=0 have_stat=0 have_type=1 
consider_visiting (early): './dir-2/dir-5': fts_info=FTS_DP, fts_level= 2,
prev_depth=3 fts_path='./dir-2/dir-5', fts_accpath='dir-5'
consider_visiting (late): './dir-2/dir-5': fts_info=FTS_DP, isdir=1 ignore=1
have_stat=1 have_type=1 
consider_visiting (early): './dir-2/dir-4': fts_info=FTS_D , fts_level= 2,
prev_depth=2 fts_path='./dir-2/dir-4', fts_accpath='dir-4'
consider_visiting (late): './dir-2/dir-4': fts_info=FTS_D , isdir=1 ignore=0
have_stat=1 have_type=1 
consider_visiting (early): './dir-2/dir-4/file': fts_info=FTS_NSOK, fts_level=
3, prev_depth=2 fts_path='./dir-2/dir-4/file', fts_accpath='file'
consider_visiting (late): './dir-2/dir-4/file': fts_info=FTS_NSOK, isdir=0
ignore=0 have_stat=0 have_type=1 
consider_visiting (early): './dir-2/dir-4': fts_info=FTS_DP, fts_level= 2,
prev_depth=3 fts_path='./dir-2/dir-4', fts_accpath='dir-4'
consider_visiting (late): './dir-2/dir-4': fts_info=FTS_DP, isdir=1 ignore=1
have_stat=1 have_type=1 
consider_visiting (early): './dir-2': fts_info=FTS_DP, fts_level= 1,
prev_depth=2 fts_path='./dir-2', fts_accpath='dir-2'
consider_visiting (late): './dir-2': fts_info=FTS_DP, isdir=1 ignore=1
have_stat=1 have_type=1 
Outstanding execdirs:-execdir multiple 3 args: echo ./one.c ./bar.c 


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?54860>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]