Feature #26560
Use reverse index for AOP matching
Status: | Resolved | Start date: | 2011-05-02 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | - | % Done: | 0% |
|
Category: | AOP | |||
Target version: | - | |||
PHP Version: | Complexity: | |||
Has patch: | No |
Description
The AOP matching done inside the ProxyClassBuilder is very slow. It doesn't scales well, because the complexity is tied by the number of pointcuts * methods (over all proxyable classes).
Since this number could get very large and the matching is a costly operataion, we should use a reverse index to get only the interesting pointcuts for a given target class.
Most pointcuts like method(F3\FLOW3\MVC\Web\Routing\Router->resolve())
could be easily indexed by using the class name and method name as the keys. Also the class and method tags could be used in an index. The setting pointcut filter could be evaluated and skipped. Since we have the
This could greatly reduce the number of pointcut matchings done for each method.
History
#1 Updated by Christopher Hlubek over 4 years ago
One example of a slow filter: PointcutMethodTaggedWithFilter
:
It uses the very slow operation getMethodTagsValues
which does a method reflection every time (with no caching). This filter is executed against every method.
#2 Updated by Sebastian Kurfuerst almost 5 years ago
- Category set to AOP
- Target version set to 1230
#3 Updated by Karsten Dambekalns almost 4 years ago
- Target version deleted (
1230)
#4 Updated by Christian Müller over 3 years ago
- Status changed from New to Resolved
- Has patch set to No
I will close this one, the results of the code sprint are tagged with #9568, and should include this optimization too.
#5 Updated by Christopher Hlubek over 3 years ago
Okay, the issue would be resolved for me with the new AOP optimizations.
Christian Mueller wrote:
I will close this one, the results of the code sprint are tagged with #9568, and should include this optimization too.