diff options
| author | 2023-03-08 15:49:18 +0100 | |
|---|---|---|
| committer | 2023-03-09 17:40:10 +0000 | |
| commit | 333d9757d2b0a06f29f3eac2d2c9e4f89b795c1e (patch) | |
| tree | 70ff3393cbf0ebef5165649f01d54b36c196c726 /api/api_test.go | |
| parent | a27edf5a52f86c837661fb20b651b708de167941 (diff) | |
Do not preallocate memory in default constructor of Sparse.*Array
By heapdump examination this saves not-an-insignificant amount of
memory and significant amount of allocations.
Similar change was also introduced for ArrayList & HashMap
implementation in JDK8.
More details in go/if-xr-android-util-collections-lazy-init.
Bug: 272467748
Test: Verified system server heapdump
Change-Id: I849dbaa46e79eae0b61b93a7ab1f5d5ef8bfbf7f
Diffstat (limited to 'api/api_test.go')
0 files changed, 0 insertions, 0 deletions