Wednesday, 15 January 2014

organization - Several function file includes in PHP -


I read through the related questions and could not find my answer. It is not about requirement / need_once or __autoload function or the name of the files is also not.

My company creates big sites and as we have grown, splitting of tasks by the relationships we have developed in practice:

inc.functions- User.php inc.functions-media Php inc.functions-calendar.php

Each of these files starts to be 1000 to 3000 lines of code. Combining this would make them a monster to make it more difficult for more developers to maintain.

However, in some of our major sites, we end up anywhere between 8 and 15 of these individual functions files.

Header contains 15 function files best method or should we find a way to combine them? Included in 12 versus 5 is quite harmful for our site to run?

If you care about performance, install an Opcocaid CE like APC Save the compiled form.

If you do not want to install APC then the difference is low, yes it takes less time to reach less files, but this is not where most of the time is spent. (Specifically the file system should be able to cache the scripts (uncompressed) in memory) if they are often requested enough.


No comments:

Post a Comment