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 #179145 is a reply to message #179144] Fri, 14 September 2012 23:43 Go to previous messageGo to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(Jerry Stuckle)

> On 9/14/2012 6:24 PM, J. Frank Parnell wrote:
>
>> When I do properties locally, on Win, it says size: 408KB, size on disc:
>> 720KB. Compared to the wordpress 'includes' dir at 5Megs, doesnt seem
>> like much, although i'm not sure if wp includes that whole dir, always.
>> Would it be more efficient to concatenate my include files?
>
> As others have said - include only what you need. The time consuming
> part is parsing the PHP code, not reading one or more files.
> Concatenating will still require PHP to parse the code.

Sure, but it makes a difference if you include a hundred files, each
with a single function, or if you just include a single file containing
all those functions.

It would make sense to group all the functions into semantic units and
put these into single files or classes. Then include the units you need.

Micha

--
http://mfesser.de/
Fotos | Blog | Flohmarkt
[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: Wed Nov 27 13:26:31 GMT 2024

Total time taken to generate the page: 0.04941 seconds