Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
9.0.0
-
None
Description
Under moderate load, my application allocates hundreds of MiB a minute in Behaviors objects:
Behaviors is a utility class to manage behaviors associated with components. Instead of exposing static methods, Behaviors is instantiated with the target component instance on every invocation. E.g.:
new Behaviors(this).onRemove(this);
This is slightly "more OO" than a static utility class, but it allocates on every call. This can easily happen hundreds of times per request.
I suggest to turn Behaviors into a simple static utility class and use it like this:
Behaviors.onRemove(this);