Skip to content

Commit 7e5ac71

Browse files
mralephcommit-bot@chromium.org
authored andcommitted
[vm/aot] Drop Library::dependencies_ early.
Even though this field is never written into snapshot dropping it eagerly allows to compact away a lot of entries in the symbols table, which are otherwise retained. On the large internal application this gives the following improvement: Breakdown by object type: +--------------------------+--------------+---------+ | Type | Size (Bytes) | Percent | +--------------------------+--------------+---------+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ArtificialRoot | -7 | 0.01% | | OneByteString | -1603 | 1.26% | | Array | -3206 | 2.51% | | (RO) _OneByteString | -122688 | 96.22% | +--------------------------+--------------+---------+ Total: -127504 bytes -0.39% of old size Change-Id: Ib6993e3036ff6b36515a17ee7f60175e1188c8fe Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153768 Reviewed-by: Ryan Macnak <[email protected]> Commit-Queue: Vyacheslav Egorov <[email protected]>
1 parent 48c2181 commit 7e5ac71

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

runtime/vm/object.cc

+1
Original file line numberDiff line numberDiff line change
@@ -12135,6 +12135,7 @@ void Library::DropDependenciesAndCaches() const {
1213512135
StorePointer(&raw_ptr()->resolved_names_, Array::null());
1213612136
StorePointer(&raw_ptr()->exported_names_, Array::null());
1213712137
StorePointer(&raw_ptr()->loaded_scripts_, Array::null());
12138+
StorePointer(&raw_ptr()->dependencies_, Array::null());
1213812139
}
1213912140

1214012141
void Library::AddImport(const Namespace& ns) const {

0 commit comments

Comments
 (0)