Skip to content

Conversation

@greglittlefield-wf
Copy link
Contributor

@greglittlefield-wf greglittlefield-wf commented Oct 8, 2025

Motivation

The amount of code generated by the over_react builder is non-negligible, and has some opportunities to be optimized, ultimately reducing the size of compiled dart2js in apps with many components.

Changes

Release Notes

Review

See CONTRIBUTING.md for more details on review types (+1 / QA +1 / +10) and code review process.

Please review:

QA Checklist

  • Tests were updated and provide good coverage of the changeset and other affected code
  • Manual testing was performed if needed

Merge Checklist

While we perform many automated checks before auto-merging, some manual checks are needed:

  • A Frontend Frameworks Design member has reviewed these changes
  • There are no unaddressed comments - this check can be automated if reviewers use the "Request Changes" feature
  • For release PRs - Version metadata in Rosie comment is correct

The JsBackedMap specialized subclass was implemented to potentially improve performance
by allowing dart2js to inline/optimize backing map operations, but from inspecting
compiled code, it doesn't seem to have much of an effect.

These two specialized subclasses result in a significant amount of extra compiled code,
so removing it at this time is worth the tradeoff.

This commit also removes workarounds for an old DDC bug.
This way, they don't get compiled as fields, which emit extra code
in each props class's constructor.

In the future, if we wanted to reuse these objects for successive
calls in builders, we could use an expando instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant