Q about Coro file::find
Aleksandar Lazic
al-anyevent at none.at
Tue Jan 31 22:16:30 CET 2012
On 31-01-2012 20:19, Marc Lehmann wrote:
> On Tue, Jan 31, 2012 at 07:49:49PM +0100, Aleksandar Lazic
> <al-anyevent at none.at> wrote:
>> I want to use more then one process which goes sequentially thru the
>> directories.
>
> Coro gives you threads, not processes, and furthermore, they all
> block when
> perl blocks on I/O (e.g. via File::Find).
>
> However, you can use IO::AIO, which offers aio_readdir and aio_stat,
> which will be done in parallel. There is also an example program
> "treescan" installed that walks a directory hierarchy and optionally
> stats
> everything.
Thank you I have totally overseen this program.
> You can try:
>
> treescan -sq /NFS-SHARE/dir1
>
> This will more or less do the same work as "du -s", but will not
> actually
> display anything. It allows you to assess any possible speed
> improvement
> though.
I will definitely give it a try.
> Coro comes with a companion module "Coro::AIO" which offers the same
> requests as IO::AIO, but the block the current thread (and only the
> current thread). That can make coding easier.
Again, thanks.
More information about the anyevent
mailing list