Changes between Initial Version and Version 1 of Ticket #17817, comment 117
- Timestamp:
- 03/10/2015 04:48:20 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #17817, comment 117
initial v1 15 15 * `$this->callbacks[ $priority ][ $idx ]` should store a numeric array. If appropriate, use constants such as self::FUNCTION and self::ACCEPTED_ARGS for 0 and 1 indexes. This will reduce memory usage. I have wanted to do this in core, but we couldn't for back compat (direct access of the array, of course). Can we do it now? Would this be manipulation in `getIterator()` (or our own iterator)? Lightweight object with ArrayAccess? Would any of these be worth it? 16 16 17 * Does the ksort() need to occur on `add_filter()`? This appears wasteful. I recognize this is a very key part of the nesting aspects of this change, but it feels heavy. (I wish PHP were more amenable to linked list manipulation, as in other languages we could do this without resorting to a sort. It's possible )17 * Does the ksort() need to occur on `add_filter()`? This appears wasteful. I recognize this is a very key part of the nesting aspects of this change, but it feels heavy. (I wish PHP were more amenable to linked list manipulation, as in other languages we could do this without resorting to a sort. It's possible slicing would be faster than sorting, but I have no data to back this up.) 18 18 19 19 * `$callbacks` appears to unnecessarily be used by reference when `$this->callbacks` is iterated over in a `foreach` in a few places.