Optimizing view hierarchy by automatically removing layout-only views
OwnerAndrew Lankes Street, Spencer Ahrens +1inventors
InventorsAndrew Lankes Street, Spencer Ahrens, Adam John Ernst
Life of this patent
Estimating the term…
Abstract
Disclosed are ways to transform an unoptimized hierarchy of views into an optimized display view hierarchy that achieves the same user interface specified by the unoptimized hierarchy but with fewer views. Various embodiments of the present disclosure render pages more quickly and with less overhead by automatically removing “layout-only” views that may affect the positioning of other views but are not drawn themselves. Reducing the number of views created and the depth of the display view hierarchy decreases memory usage and improves computing device display system performance and reliability.
Claims20
A method performed by a computing system having memory and a processor for optimizing a hierarchy of views before rendering the optimized hierarchy of views for display, comprising:
- receiving a view in the hierarchy of views;
- determining that the view does not require any substantive rendering;
- identifying any child node views in the hierarchy of views that are child nodes of the view;
- applying layout effects of the view to the child node views;
- identifying a view in the hierarchy of views that is a parent node of the view;
- moving the child node views in the hierarchy from being child nodes of the view to being child nodes of the parent node of the view;
- and
- omitting the view from the hierarchy of views.
A computer-readable storage medium storing computer-executable instructions for causing a computing system having a processor to optimize a hierarchy of views before rendering the hierarchy of views for display, the instructions comprising:
- instructions for receiving a view in the hierarchy of views;
- instructions for determining, by the processor, that the view does not require any substantive rendering;
- instructions for identifying any views in the hierarchy of views that are child nodes of the view;
- instructions for applying layout effects of the view to the child node views;
- instructions for identifying a view in the hierarchy of views that is the parent node of the view;
- instructions for moving the child node views in the hierarchy from being child nodes of the view to being child nodes of the parent node of the view;
- and
- instructions for omitting the view from the hierarchy of views.
A system in a computing device for optimizing a hierarchy of views for display on a screen of the computing device, comprising:
- a view manager component configured to receive a command regarding a view in the hierarchy of views;
- a display effect determination component configured to identify whether the received command has any effect on the view other than layout;
- a hierarchy optimization component configured to, in the event that the received command has no effect on the view other than layout, omit the view from the hierarchy;
- and
- a display component configured to display the hierarchy after the omitting of views by the hierarchy optimization component.
Dependencies are inferred from the claim text.