I am in the process of writing a class that is likely to turn out to be around 3,000 lines of code.
What I would like to know is very simple, initiates this class at the top of each page, slows down the page execution time, although only one / two methods of objects will be used? Will I have more load on my server if it is accessed several thousand times a day?
If so, should I look for creating extensions to handle each method, and not for the entire class in a single file?
EDITED
Firstly, to fix KingCrunch and Kenaniah, this class is intended for my API, which, in the end, means that it contains many functions for extracting data that will be displayed on the website and in our iPhone application, as well as in our Facebook application. So 3000 lines are pretty damn small, considering the size and capabilities of our site, not to mention that more than 700 of these lines are comments. Therefore, I can assure you that there is no design flaw, although there may be a structural flaw, so I ask this question ...
The construct function simply sets default values ββfor certain variables, no more.
I completely rewrote this file from scratch, so there is no old code, and I'm sure the methods in the class are as efficient as they can be.
I track my server usage, etc., and also simulate large amounts of traffic using the apache ab tool, and although my memory usage is increasing, everything seems to be in order.
php class lines-of-code
Ben carey
source share