Skip to content

Automatic subnode management (ASM) and node interface states #693

Description

@nguyenhuy

@maicki and I are facing a problem in which subnodes of an ASM-enabled node have not been inserted into the supernode by the time the supernode enters the visible state. That is because ASM inserts new nodes when the pending layout is applied. Once the nodes are inserted, they'll also get the interface states of the supernode, all in one go, and start playing catch-up.

One solution is to call -[ASDisplayNode layoutIfNeeded] in -didEnterPreloadState of ASCellNode, if the cell node uses ASM. Since cell nodes are guaranteed to have their calculated layout by the time they enter the preload range, running a layout pass there shouldn't introduce significant overheads. On the other hand, doing so ensures that all subnodes are inserted at the right time and can start preloading their contents much sooner than the current implementation.

@appleguy @maicki @Adlai-Holler @garrettmoon Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions