Reply to Re: speeding up reading opendir...

Your name:

Reply:


Posted by Csaba Gabor on 01/09/08 12:56

On Jan 9, 9:34 am, jodleren <sonn...@hot.ee> wrote:
> I have a system, which reads in the entire tree - all files. As of
> now, there are 1312 folders to read.
>
> 1st time it takes 53-60 seconds to read. The data is somehow cached,
> 2nd time time is takes 2-3 seconds.
>
> Is there a way to "cache" data beforehand? Like "preparing" the
> directory....?
>
> WBR
> Sonnich

You might simply direct the output of the dir
command into a file (or string or array depending
on which exec type of command you use) and then
parse that yourself. It should be FAR faster.

For reference,
It took my Win XP system about 315 seconds to do:
C:\>dir /s > delme.dir
with the entire c: drive, about 140000 files
totaling about 44 gigabytes in 32000 directories.
The resultant file was about 10 megabytes

Csaba Gabor from Vienna

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация