Skip to content
Commit b293d933 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Optimize the Parcel read/write of common window data

The Parcel read/write speed of MergedConfiguration/InsetsSource
becomes 4x+ faster.

Because writeParcelable sends additional type info which is
unnecessary if the type is known on the reading side, replace
the usages to writeTypedObject and well-written readFromParcel.
That saves the time of class lookup and object creation.

Bug: 181025587
Test: vogar --mode app_process --benchmark \
frameworks/base/core/tests/benchmarks/src/android/os/ParcelableBenchmark.java

Change-Id: I29548ce6c2e5886f0e90a5dc70d8e9ecc0fb25a8
parent 1cd9f06f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment