I'm writing a PHP class. At the moment there are 1,000 lines of code and the file size is 46 KB. It's not an insane size, but this got me to thinking.
Q: At what point would performance start to be affected due to file size and/or the amount of code included in the PHP file?
For php there is no noticeable difference (especially if you use any opcode cache) if there is 10 files each 100 lines or 1 with 1000 lines.
But from maintainability point of view it would be better to split the class responsibilities to several.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With