Eliminate dynamic function definitions, ie create_function
|Reported by:||ScottMac||Owned by:||westi|
create_function() calls are essentially a form of eval() where the body of the functions is defined at runtime rather than compile time. This patch removes all but one of the calls within the translation code.
There are a few reasons for doing this, one is apc can't cache the results of the function definition and secondly HipHop doesn't support complex create_function definitions.
Most of the references were array_filter / array_map and replaced with a simple foreach.
Others were sorting and a callback function was added.
Change History (46)
- Component changed from General to Optimization
- Keywords needs-patch added
comment:26 @nacin — 14 months ago
- Component changed from Optimization to General
- Focuses performance added
- Milestone changed from Future Release to 3.9
comment:29 @markjaquith — 13 months ago
- Resolution set to fixed
- Status changed from accepted to closed
comment:35 @TobiasBg — 12 months ago
- Resolution fixed deleted
- Status changed from closed to reopened