Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!fu-berlin.de!dotsrc.org!filter.dotsrc.org!news.dotsrc.org!not-for-mail Sender: wegge@huddi.jernurt.dk Newsgroups: comp.lang.php Subject: Re: How expensive is glob'ing a dir and including all the files? References: <38015b6a-5ef2-4f92-9aa2-6eea01c7097a@googlegroups.com> From: Anders Wegge Keller Date: 15 Sep 2012 08:08:10 +0200 Message-ID: <87mx0rddit.fsf@huddi.jernurt.dk> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 16 Organization: SunSITE.dk - Supporting Open source NNTP-Posting-Host: 213.239.202.162 X-Trace: news.sunsite.dk DXC=GffS8:3H2F_5LoVIWDNeH\YSB=nbEKnk[6Z8eE_Jfg2]=anD=lJfodR88 writes: > So, my question is, am I saving a significant amount of ram/cpu/time > by keeping this cache of filenames or should I just glob the dir and > include what's in there everytime? You may want to consider autoloading classes as needed. See http://php.net/manual/en/language.oop5.autoload.php This approach is of course dependent on using PHP5 *and* having an OO design. -- /Wegge Leder efter redundant peering af dk.*,linux.debian.*