DirtyScopeIndex
class 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.