summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/ProgramFragmentFixedFunction.java
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2020-10-30 19:35:25 -0600
committerJeff Sharkey <jsharkey@android.com>2020-11-10 11:58:03 -0700
commit4ccea8796991d678ead4399130ec31edf63ff4fa (patch)
treedfa40146252247042429bb27fec77808f75081f7 /rs/java/android/renderscript/ProgramFragmentFixedFunction.java
parentb5856365b40c454ed126210b99679d9d1a444b28 (diff)
Custom binary XML wire protocol.
We've identified that XML writing and reading uses roughly 1.5% of all system_server CPU, and can generate many temporary objects. Building on the recent TypedXmlSerializer/PullParser interfaces, this change introduces new BinaryXmlSerializer/PullParser implementations that store data using a custom binary wire protocol. Benchmarking of a typical packages.xml has shown this new binary approach can write 4.3x faster and read 8.5x faster, while using 2.4x less disk space: timeWrite_Fast_mean: 27946635 timeWrite_Binary_mean: 6519341 timeRead_Fast_mean: 59562531 timeRead_Binary_mean: 7020185 A major factor in choosing to invest in this new wire protocol is that it enables the long-tail of over 100 unique XML schemas used across the OS internals to be transparently upgraded to gain these benefits with only minimal changes, reducing the risks associated with rewriting those schemas. Finally, since the wire protocol is essentially a serialized event stream, it's trivial to transparently convert this new protocol into human-readable XML and vice-versa. The tests in this change demonstrate this translation working correctly, and future changes will introduce new shell tools to aid development work. Bug: 171832118 Test: atest FrameworksCoreTests:android.util.XmlTest Test: atest FrameworksCoreTests:android.util.BinaryXmlTest Test: atest CorePerfTests:android.util.XmlPerfTest Change-Id: Ib9390701f09562dca952b3786622675b9c68a462
Diffstat (limited to 'rs/java/android/renderscript/ProgramFragmentFixedFunction.java')
0 files changed, 0 insertions, 0 deletions