Password extension - the extension ezx_mbpaex selects * from the table with the same name which, as we have 400k+ users and growing massively, is a large process.
This is unnecessary. Several much better solutions are available. The attached patch adds a simple "LIMIT 1". Other possible fixes:
- SELECT COUNT FROM ezx_mbpaex
- SELECT COUNT FROM ezx_mbpaex where 1 = 0
- if ( !in_array( 'ezx_mbpaex', eZDB::instance()->relationList() ) )
Generally speaking, this kind of checking should not be done on every page request as it is in this case. No other datatype validates schema like this before registering datatype. This can be done in class functions instead (when user tries to add datatype to class) and maybe the login handler. It would make sense to abstract this to an eZDB::tableExists('...') method that we can fix/improve over time.
We should definitely find/use a common pattern for this check for datatypes that need extra tables. Right now every extension does its own thing. Perhaps we should not even code these checks in php, but leave it to the 'enable extension' button to find the proper share/db_schema.dba file and install it.
- Enable ezmbpaex
- Access user objects