3 ms·
Can you share with us the tuning you did with class loading for instance ? thanks for your comment.
by camus 13y ago
Can you share with us the tuning you did with class loading for instance ? thanks for your comment.
- jakejake 13y agoOh sure, nothing to complicated. Basically I just happened to notice that I loaded several classes that were not always needed. I was able to tune up the framework to load some of them on-demand instead. One example is that the framework loaded an lot of MySQL classes whether or not you do a DB query. So, now I wait to initialize the DB stuff until after you make a call that requires it. Phreeze has always been lazy about opening the DB connection, but now it's even lazier and doesn't even load the classes until you need them! There were some other utility-type classes like XML parsing and such that probably don't even get used much. So that is lazy loaded now too. For a non-DB request I was able to get it down from about 37 files that loaded to around 20. For a DB request I think it's still around 30 files, but I definitely consider that a performance improvement. The benchmark led me to scrutinize what is being loaded so I think it has already improved the framework.