eZ Publish 5.x / eZ Platform might (query optimizers add some weight as well) benefit from getting a Query optimizer.
The ideas are several:
- optimize identifier criterias to transfer them to using the id equalent ( ContentTypeIdentifier -> ContentTypeId )
- optimize away uneeded permission checks
- 1. detect root level criteria for Location, Subtree and Section in user query and skip role assignments with limitations that does not match
- 2. detect root level criteria for Location, Subtree, Section, ContentType in user query and skip policies which has limitations that does not match
However as hinted in the intro, there is a cost to this, so it might only make sense to do when Query's are persisted (ref "Views" as they are called in REST API v2).