FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » How expensive is glob'ing a dir and including all the files?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: How expensive is glob'ing a dir and including all the files? [message #179160 is a reply to message #179149] Sun, 16 September 2012 14:37 Go to previous messageGo to previous message
Peter H. Coffin is currently offline  Peter H. Coffin
Messages: 245
Registered: September 2010
Karma:
Senior Member
On 15 Sep 2012 23:41:18 +0200, Anders Wegge Keller wrote:
> Jerry Stuckle <jstucklex(at)attglobal(dot)net> writes:
>
>> On 9/15/2012 2:08 AM, Anders Wegge Keller wrote:
>>> "J. Frank Parnell" <juglesh(at)gmail(dot)com> 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.
>>>
>>
>> Additionally, you're never sure which module you got.
>
> Speaking from experience?
>
>> All kinds of hard-to-diagnose things can happen when someone uploads
>> a module of the same name but earlier in the search path.
>
> You let "someone" muck around with your code? Are you hosting at
> GoDaddy or something like that?

"Someone" could be another developer working on the same project of even
yourself comeing back to the code after ignoring it for a few years. An
awful lot of code looks completely foreign with three years on it, even
if one was completely familier with it back then.

--
31. All naive, busty tavern wenches in my realm will be replaced with
surly, world-weary waitresses who will provide no unexpected
reinforcement and/or romantic subplot for the hero or his sidekick.
--Peter Anspach's list of things to do as an Evil Overlord
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: php and PDO Error HTTP 500
Next Topic: PHP Update
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 09:55:19 GMT 2024

Total time taken to generate the page: 0.04104 seconds