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>
- fix some discrepancies between old and new deferred loading.
* Kernel is now using the correct world impact
* For the old FE, I'm more careful about avoiding metadata nodes when mirros
are disabled as well.
* Better approximate when a constant is deferred in the kernel codegen
- make 'dump()' independent of the IR, so we can easily compare them side by
side.
- exclude primitives in kernel since we don't need to track them. I
didn't change the old front end because it is not as easy to do. I did this
change because kernel was processing many more constants than the old frontend
(the old frontend skipped constants that were never evaluated, we have no way
to do it selectively like that in the new front end).
Change-Id: I337d3fd818753125476b7390da5d900ebdc02709
Reviewed-on: https://dart-review.googlesource.com/34509
Reviewed-by: Emily Fortuna <efortuna@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
The constant collector was inconsistent with the old frontend: we were
skipping primitives and we were not going into the body of closures.
Change-Id: I3321426da7e684d203f0ac7a2a2c7028f3138a7b
Reviewed-on: https://dart-review.googlesource.com/32663
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Emily Fortuna <efortuna@google.com>