You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.
Some of the mechanisms that widget-core leverages currently significantly contribute to the memory footprint of a running application. From an initial investigation extending from Evented and Destoryable and leveraging own, on, and emit internally in the widget mechanism contribute an unreasonably high portion towards this footprint.
Child widgets are no longer own'd by their parent (owing to another memory issue documented here #745) and as a result nothing they own will be explicitly destroyed as they will never be destroyed themselves. Therefore there should be no impact on functionality and garbage collection widgets no longer own any of there resources, thus leaving it to the browser garbage collectors to identify when an instance no longer has any references.
Currently the eventing mechanism is used by widget-core to propagate an invalidate event up the widget tree to the projector and to "notify" widgets when elements and the widget themselves have completed their render (meta and onElementCreated/onElementUpdated).
Finally there are some references that are automatically created on widget construction but will not always be used
Proposal(s):
Remove Evented and Destroyable from the WidgetBase inheritance chain (and all current own calls) replacing with an optional constructor argument for a parents invalidate function. This function will be used in the same way that the current invalidated event emitted, by calling it if one exists.
Expose nodeHandler, onElementCreated and onElementUpdated from WidgetBase that will be called directory from vdom to inform the widget of these events.
Identify widget instances/resources that do not need to be created on construction and can be lazily constructed on first usage, for example this._registry and this._metaMap.
The text was updated successfully, but these errors were encountered:
Enhancement
Some of the mechanisms that widget-core leverages currently significantly contribute to the memory footprint of a running application. From an initial investigation extending from
Evented
andDestoryable
and leveragingown
,on
, andemit
internally in the widget mechanism contribute an unreasonably high portion towards this footprint.Child widgets are no longer
own
'd by their parent (owing to another memory issue documented here #745) and as a result nothing theyown
will be explicitly destroyed as they will never be destroyed themselves. Therefore there should be no impact on functionality and garbage collection widgets no longerown
any of there resources, thus leaving it to the browser garbage collectors to identify when an instance no longer has any references.Currently the eventing mechanism is used by widget-core to propagate an invalidate event up the widget tree to the projector and to "notify" widgets when elements and the widget themselves have completed their render (meta and onElementCreated/onElementUpdated).
Finally there are some references that are automatically created on widget construction but will not always be used
Proposal(s):
Remove
Evented
andDestroyable
from theWidgetBase
inheritance chain (and all currentown
calls) replacing with an optional constructor argument for a parents invalidate function. This function will be used in the same way that the currentinvalidated
event emitted, by calling it if one exists.Expose
nodeHandler
,onElementCreated
andonElementUpdated
fromWidgetBase
that will be called directory fromvdom
to inform the widget of these events.Identify widget instances/resources that do not need to be created on construction and can be lazily constructed on first usage, for example
this._registry
andthis._metaMap
.The text was updated successfully, but these errors were encountered: