Working on a database class that got quite big, and is likely to get much bigger, I started writing a lot of attributes and methods related to one specific aspect of the database (users, comments, pages etc.) So it feels like it’s about time to subclass the database class to several classes, each dealing with their own aspect, and only have the database class contain the absolute core functionality.
However, doing that feels like making extra classes and dealing with includes and the likes for nothing. The code is pretty maintainable as-is and “divided” (via comments) into the correct sections, and it’s not like a “big” class is gonna damage performance noticeable.
So, I come to you: When is the right time, in your opinion and experience, to subclass? Not just in this specific case, but in general terms.
I go by logical grouping of methods and functionality.