Reduce closure allocation in RenderObject.cleanRelayoutBoundary#51439
Reduce closure allocation in RenderObject.cleanRelayoutBoundary#51439ferhatb merged 1 commit intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
/cc @vsmenon @sigmundch could this also be improved in the compiler? |
|
@rakudrama - on optimizability Non-trivial if compiler cannot identify whether |
|
This has been discussed at: dart-lang/sdk#26932 Since the language has evolved to have much richer static constraints (e.g. definite assignment is quite involved), I would advocate for a static definition of free variables and have the CFE hoist the functions. |
|
@leafpetersen How about updating the language spec so that closures with no free variables are more like static or top-level methods? |
Description
Changes visitChildren closure allocation to use static method instead.
Related Issues
Discovered while profiling web EAP client project.
Tests
Covered by gallery benchmark.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.