« Last post by tobias on October 22, 2016, 04:14:35 AM »
Ever since upgrading to feng office 3.x the initial request was extremly slow (~40secs). I found that the reason is that MaxSystemPermission.getColumns() (which is called a lot, e.g. by columnExists()) accesses the database every time.
DataObject::loadFromRow() loops over the fields and calls columnExists() for each one. If that returns true, it calls setColumnValue(), which again calls columnExists(). In the case of `MaxSystemPermission`, columnExists() is called two more times from getColumnValue(). So for each field, the database is accessed 4 times.
After caching the result of getColumns(), the initial request went done to under 1sec. I think caching is fine because the table structure should not change during one request.
Unfortunately, this board seems to be buggy and I cannot upload the patch (shows me "Cannot access attachments upload path!" or "Sorry, you are not allowed to post external links."). I hope the information I provided is sufficient to reproduce it.