… | |
… | |
50 | my ($dirs, $files) = @_; |
50 | my ($dirs, $files) = @_; |
51 | |
51 | |
52 | printfn "", [$path] unless $opt_nodirs; |
52 | printfn "", [$path] unless $opt_nodirs; |
53 | printfn $path, $files unless $opt_nofiles; |
53 | printfn $path, $files unless $opt_nofiles; |
54 | |
54 | |
|
|
55 | IO::AIO::poll_cb; |
|
|
56 | |
55 | if ($opt_stat) { |
57 | if ($opt_stat) { |
56 | aio_wd $path, sub { |
58 | aio_wd $path, sub { |
57 | my $wd = shift; |
59 | my $wd = shift; |
58 | |
60 | |
59 | aio_lstat [$wd, $_] for @$files; |
61 | aio_lstat [$wd, $_] for @$files; |
… | |
… | |
62 | |
64 | |
63 | &scan ("$path$_") for @$dirs; |
65 | &scan ("$path$_") for @$dirs; |
64 | }; |
66 | }; |
65 | } |
67 | } |
66 | |
68 | |
67 | IO::AIO::max_outstanding 64; |
69 | IO::AIO::max_outstanding 400; |
68 | IO::AIO::min_parallel 32; |
70 | IO::AIO::min_parallel 20; |
69 | |
71 | |
70 | for my $seed (@ARGV) { |
72 | for my $seed (@ARGV) { |
71 | $seed =~ s/\/+$//; |
73 | $seed =~ s/\/+$//; |
72 | aio_lstat "$seed/.", sub { |
74 | aio_lstat "$seed/.", sub { |
73 | if ($_[0]) { |
75 | if ($_[0]) { |