summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authordestradaa <destradaa@google.com>2015-01-30 16:11:20 -0800
committerdestradaa <destradaa@google.com>2015-02-03 13:17:14 -0800
commit6bde4683ae1f70f7b5e53f853b6a7479bcebd5d5 (patch)
tree3804ff0a8b55fff0a506d7f5b2328c0e355d68ba /tools/aapt2/java/JavaClassGenerator_test.cpp
parentad575295918dba197dcf61bfb81d56348ed1f073 (diff)
Reduce memory usage of GpsStatus objects.
A simple GpsStatus object uses 9K of space, given that it initializes an array of 255 GpsSatellite objects. This change reduces the memory footprint in the average case, and keeps the semantics of the API and its GpsSatellite sibling objects without any changes. In a best case scenario it brings the memory usage per object to 1K. It's likely in most cases that only 20-50 satellites will be in view. So the usage should not exceeed half of the original memory usage. It was considered to keep the internal array but a SparseArray provided bigger memory savings in the test scenario of ~700B. Change-Id: Ie2d2144d776a74d4904a08c0d6c5aec6d3bba7cc
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions