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
Loading
Please register or sign in to comment