in reply to Filesystem: How to grab subset of directory structure
Perhaps stuffing the whole list into memory just to throw most of them away is making things slow (doesn't seem very likely with only 20,000 file names, but worth considering):
(:while( defined( $_ = readdir MYDIRHANDLE ) ) { push @aryFiles, $_ if /\.xml$/i; } closedir MYDIRHANDLE; # ^^^ note this
I'd recommend the much simpler glob("*.xml"), but it appears that there are some alarming inefficiencies there that need investigation. |:
- tye
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Filesystem: How to grab subset of directory structure (less RAM?)
by P0w3rK!d (Pilgrim) on Jun 25, 2003 at 18:50 UTC |