summaryrefslogtreecommitdiff
path: root/aosp/dynamic_partition_control_android_unittest.cc
diff options
context:
space:
mode:
authorKelvin Zhang <zhangkelvin@google.com>2020-10-27 15:50:33 -0400
committerKelvin Zhang <zhangkelvin@google.com>2021-01-04 18:51:11 -0500
commitcf4600e1582f3001a26b4430a5ffbfe23b3ff4d1 (patch)
tree05b10c5bf52e457d20c93bf04ce9d2fe8fb205c4 /aosp/dynamic_partition_control_android_unittest.cc
parent3265b317b39edea86b5351029092b7728ca8461b (diff)
Use string_view for pref interface to reduce copy
If you pass in a static string literal like "Hello World!", then with parameter type of const string& you need to construct a new string object, requiring a copy. It will also require a copy if your data is in another container, for example std::vector<char> . In update_engine, we store manifest bytes in std::vector, and sometimes we want to save that manifest to disk. This CL can help us reduce copy of the manifest(up to 2MB). Test: treehugger Change-Id: I70feb4c0673c174fd47f02c4bd41994f74cda743
Diffstat (limited to 'aosp/dynamic_partition_control_android_unittest.cc')
0 files changed, 0 insertions, 0 deletions