Every surviving child canonicalises every fragment and sorts the resulting IDs in canoniseAssemblyStateAndBuildKey (line 85), including unchanged fragments copied at line 54 (line 54).
Store {mask, edgeCount, canonicalId, connected} per fragment. Propagate metadata for unchanged fragments, use the enclosing duplicate class ID for the retained fragment, and canonicalise only newly split residuals. Cache residual component IDs alongside masks. This can remove millions of successful hash-table lookups.
Every surviving child canonicalises every fragment and sorts the resulting IDs in canoniseAssemblyStateAndBuildKey (line 85), including unchanged fragments copied at line 54 (line 54).
Store {mask, edgeCount, canonicalId, connected} per fragment. Propagate metadata for unchanged fragments, use the enclosing duplicate class ID for the retained fragment, and canonicalise only newly split residuals. Cache residual component IDs alongside masks. This can remove millions of successful hash-table lookups.