I've just noticed that my app is including over 148 php files on one page. Bear in mind this is the back end admin and not the main site, but is this too many? What impact does a large number of includes have on a server, both whilst under average load and stressed? Would disk I/o be a problem?
Included File Stats
File Type - Include Count - Combined File Size
- Index - 1 - 0.00169 MB
- Bootstrap - 1 - 0.01757 MB
- Helper - 98 - 0.58557 MB - (11 are Profiler related classes)
- Configuration - 8 - 0.00672 MB
- Data Store - 23 - 0.10836 MB
- Action - 8 - 0.02652 MB
- Page - 1 - 0.00094 MB
- I18n Resource - 7 - 0.00870 MB
- Vendor Library - 1 - 0.02754 MB
- Total Files - 148 - 0.78362 MB
Time ran 0.123920917511
Memory used 2.891 MB
Edit 1. Should be noted that this is a worst case scenario page. It has many different template models, controllers and associated views because it handles publishing with custom fields.
Edit 2. Also the frontend has agressive page caching so the number of includes in the front is roughly 30-40 at the moment.
Edit 3. Profiler when turned off won't include the files so this will reduce quite a few includes