expinch
05-23-2005, 11:17 AM
I'm working on a project that is starting to get relatively large and I'm trying to figure out ways to improve efficiency. Right now my project uses both procedural and OO code and I have quite a few "utility files" (for procedural) and objects files (for OO).
To make things easier, I have two global include files to themselves include all of the other files or classes needed for the project. Each uses a series of "require_once" statements to get all of the needed functionality for a particular file. the section of code where I use procedural code uses the utility files and the OO code uses the classes.
While this is a great way to organize my files, I'm curious if including utility files or classes that aren't used in a particular file slowing down my application. My gut instinct tells me that there has to be some overhead because all of these functions and objects will have to be loaded into memory for every page that references them, but I'm not entirely sure. What approach do you guys use?
To make things easier, I have two global include files to themselves include all of the other files or classes needed for the project. Each uses a series of "require_once" statements to get all of the needed functionality for a particular file. the section of code where I use procedural code uses the utility files and the OO code uses the classes.
While this is a great way to organize my files, I'm curious if including utility files or classes that aren't used in a particular file slowing down my application. My gut instinct tells me that there has to be some overhead because all of these functions and objects will have to be loaded into memory for every page that references them, but I'm not entirely sure. What approach do you guys use?