DirtyScopeIndex

Pre-computed index over a set of dirty scope keys for O(1) descendant lookups.

Built once per resolve/layout pass from the dirty scope keys, then queried O(tree_size) times during reconciliation and layout. Exploits the structural parent pointers in com.facebook.litho.DefaultGlobalKey and com.facebook.litho.ManualGlobalKey to pre-compute the set of all ancestors of all dirty scopes. A query "does any dirty scope descend from this key?" becomes a single hash lookup into the ancestor set.

For StringGlobalKey (legacy, flag-off path) which has no parent pointer, falls back to string-prefix matching.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val size: Int

Functions

Link copied to clipboard
operator fun contains(key: GlobalKey): Boolean

Returns true if key is directly in the dirty scope set.

Link copied to clipboard

Returns true if key is dirty or has a dirty descendant.

Link copied to clipboard

Returns true if any dirty scope is a strict descendant of key.

Link copied to clipboard