under a flag.
This reapplies commit 70e1517d98, but adds a flag
to gradually migrate users before enabling it by default.
Patchset 1 matches the old CL
Change-Id: Iaf7ee3dec8d4aa658f0b4334549b507e5a610a68
Reviewed-on: https://dart-review.googlesource.com/c/86444
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This reverts commit 70e1517d98.
Reason for revert: saw unexpected regression on acx-gallery as well. I'd like to look in more detail and reland if it is justified.
Original change's description:
> Record deferred accesses in kernel world impacts and use it for splitting.
>
> On large apps this cuts down the time spent in the deferred loading algorithm by
> two thirds. To address issue #35311, this CL keeps things sound and may load in
> the main unit more code.
>
> On some large apps, it appears the effect of this change is not that measurable,
> and we even see an improvement. I'm still validating the data, but I believe
> this is in part because there was a different bug
> in the previous algorithm: constructors were never deferred
> because we were looking for the constructor-name, usually '', instead of the
> enclosing class name.
>
> My current data is that, the main unit of some large app shows:
> old algorithm: 13,213,191
> sound algorithm: 13,150,145
> unsound algorithm*: 13,147,282
> fixed old algorithm: 13,146,509
>
> * ignoring return type of closures
>
>
> Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
> Reviewed-on: https://dart-review.googlesource.com/c/85725
> Commit-Queue: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
TBR=johnniwinther@google.com,sigmund@google.com
Change-Id: I6992279bebcc99578f94087a17d6c327b32a0876
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/86246
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
On large apps this cuts down the time spent in the deferred loading algorithm by
two thirds. To address issue #35311, this CL keeps things sound and may load in
the main unit more code.
On some large apps, it appears the effect of this change is not that measurable,
and we even see an improvement. I'm still validating the data, but I believe
this is in part because there was a different bug
in the previous algorithm: constructors were never deferred
because we were looking for the constructor-name, usually '', instead of the
enclosing class name.
My current data is that, the main unit of some large app shows:
old algorithm: 13,213,191
sound algorithm: 13,150,145
unsound algorithm*: 13,147,282
fixed old algorithm: 13,146,509
* ignoring return type of closures
Change-Id: I7d3e525393ef38979b26051b4d354fc1001560af
Reviewed-on: https://dart-review.googlesource.com/c/85725
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This will be used initially to create the 3-way split in the compiler. Later
this will:
- include our transformation for super mixin calls
- remove the need to emit the .dill after global analysis
- eventually get replaced by a modular step that only builds a portion of the
.dill file.
Change-Id: Iebf2bd6d023716f04dc542ae9b2a85919159c4c0
Reviewed-on: https://dart-review.googlesource.com/c/85840
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This:
- exposes the feature as an experiment flag
- cleans up the code to prevent issues with strong-mode checks
- provides only a single implementation, but lets users use a hook to tailor the feature to their needs.
Change-Id: I3bf277b76b7503235c35bfbf83356c953405ff6f
Reviewed-on: https://dart-review.googlesource.com/c/84880
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Apparently V8 will keep the parse tree and this might reduce startup latency in evaluating the deferred parts.
Change-Id: If8662c7efcc855a9e87779baeeb460108283e681
Reviewed-on: https://dart-review.googlesource.com/c/84882
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This mostly fires on the expansions of
a?.b = x;
a?.f();
since these expansions to conditional, e.g.
a==null ? null : (a.b = x)
have null in the then-branch which is unused in the statement context.
Change-Id: I2a9ab6e3c46e025eedb2040e0a083c29ff7c058e
Reviewed-on: https://dart-review.googlesource.com/c/84436
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Since we switched to the CFE we no longer use this, the CFE recomputes the package-configuration internally.
Change-Id: Icdc2a3eeff1aa75e560157ecf0d5320208096d21
Reviewed-on: https://dart-review.googlesource.com/c/84362
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This was a .ini-like format that we used for our old *.platform files. Those
files are now replaced by libraries.json.
Change-Id: Ica00fcdafcecf676195a07873c41622adafdf1e3
Reviewed-on: https://dart-review.googlesource.com/c/84340
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Pass through method.requiredParameterCount even when not needed for
Function.apply.
1. Decreases entropy (smaller gzip for same sized file)
2. We want the count for making decisions on using specialized tear-offs.
Change-Id: Ib45660b8a90425f003fc2fa1f670baf549fc6154
Reviewed-on: https://dart-review.googlesource.com/c/84022
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>