-
Improvement
-
Resolution: Fixed
-
Major
-
2.6
-
MOODLE_26_STABLE
-
MOODLE_26_STABLE
-
w32_
MDL-40943_m26_observers -
-
BACKEND Sprint 3
At present we calculate the priority of "" and observers of individual events together, I would like to propose to always first execute all "" ordered by priority and then all other observers sorted separately by priority.
benefits:
1/ tiny bit faster when constructing the nested array of observers
2/ tiny less memory used because the cached list of handlers would be smaller ('*' would not be repeated)
3/ this would allow us to introduce observing of parent class events without breaking BC (if we ever want that in the future)
problems:
1/ specific observers could not be executed first and '*' could not be last
The priority was introduced in order to allow the logging subsystems to process events as the first observer to eliminate data modifications from previous handlers. So far we did not find any other major use cases for the priority flag in observers - ideas?
- has a non-specific relationship to
-
MDL-39846 Define new event dispatcher behaviour and implement it
-
- Closed
-