Feature #26560

Use reverse index for AOP matching

Added by Christopher Hlubek over 10 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
AOP
Target version:
-
Start date:
2011-05-02
Due date:
% Done:

0%

Estimated time:
PHP Version:
Has patch:
No
Complexity:

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.

#1

Updated by Christopher Hlubek over 10 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 about 10 years ago

  • Category set to AOP
  • Target version set to 1230
#3

Updated by Karsten Dambekalns about 10 years ago

  • Target version deleted (1230)
#4

Updated by Christian Müller over 9 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 9 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.

Also available in: Atom PDF