Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please merge dart2js changes into stable channel 2.7.* #40217

Closed
sigmundch opened this issue Jan 17, 2020 · 2 comments
Closed

Please merge dart2js changes into stable channel 2.7.* #40217

sigmundch opened this issue Jan 17, 2020 · 2 comments
Assignees
Labels
area-infrastructure Use area-infrastructure for SDK infrastructure issues, like continuous integration bot changes. merge-to-stable

Comments

@sigmundch
Copy link
Member

commit(s) to merge: aa56cd3 1103d9f b050a59 a57a977 75fc15c b233061 4bc9c8b 529913f a92a9f1

merge instructions:

git cherry-pick aa56cd39a3 1103d9fdb5 b050a59d3b a57a97703a 75fc15c7e1 b233061a90 4bc9c8b52c 529913fd39 a92a9f1ba2

Together these merged cleanly on my client and I was able to build the sdk and manually run dart2js.

reason: considerable compile-time performance improvements for external apps (details below). We iterated on these changes for a while with one our customers, they have tried dev releases and patches with these changes and and they saw a huge reduction in memory utilization on their apps (from 20G to 12G of RAM), and compilation time (from 35 minutes, down to 11 minutes). These changes were designed to be generally helpful to other apps as well.

/cc @dgrove @vsm @kevmoo @mit-mit @whesse @athomas
/cc @rakudrama

Details

We have been iterating for a long time on reducing the total memory used and total compilation time spent on some large apps. Some apps have more pathological cases than others (see #27883).

We made several changes to help with this, and some small refactoring in between that unfortunately we need to also cherry-pick in order to make the merge clean.

a92a9f1 (dart2js) initialize the receiver type to its static type during inference:

  • important memory and compile-time savings: about 25-30% memory savings on small samples, possible more for the large apps, and 2x performance improvement.

529913f (dart2js) remove unnecessary uses of receiverMask:
4bc9c8b (dart2js) rename typeOfSend, delete unused typeOfGetter:

  • both are small refactorings to make the change above easier

b233061 Ensure native methods default to have all side-effects:

  • correctness issue: addressing the performance issue exposes a correctness issue fixed here first.

4eae396 (dart2js) release some data-structures after resolution:

  • a large memory savings as well, about 25% of memory on some samples.

75fc15c [dart2js] Use cache in CommonMasks.isInterceptor:

  • an important compilation performance improvement, cuts down about 500s to 10s on large apps.

a57a977 [dart2js] Make repeated 'usedAsVariable' tests faster:

  • another compilation performance improvement, cuts down about 100s of compilation time on pathological apps.

b050a59 (dart2js) merge inferrer-engine interface and implementation:
1103d9f (dart2js): seal-in members used only within the inferrer_engine class:
aa56cd3 (dart2js): rename 'assignments' to 'inputs' in global analysis:

  • refactor needed to make later merge clean
@sigmundch sigmundch changed the title Please merge #HASH into stable channel Please merge dart2js changes into stable channel 2.7.* Jan 17, 2020
@mit-mit mit-mit added the area-infrastructure Use area-infrastructure for SDK infrastructure issues, like continuous integration bot changes. label Jan 20, 2020
@robbecker-wf
Copy link

FYI I verified that these cherry picks onto the 2.7.0 tag exhibit all of the dart2js performance gains for us.

@athomas athomas self-assigned this Jan 23, 2020
@athomas
Copy link
Member

athomas commented Jan 23, 2020

Released with 2.7.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-infrastructure Use area-infrastructure for SDK infrastructure issues, like continuous integration bot changes. merge-to-stable
Projects
None yet
Development

No branches or pull requests

4 participants