summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2015-07-10 09:56:34 -0700
committerJohn Reck <jreck@google.com>2015-07-10 10:08:31 -0700
commit476f7158222e49ec24a5fc08f0bbb33fb8ca10bf (patch)
tree44c88b7a0e71ddeae9be4d326256b31429daf016 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent9613e9b76410b15b7f2700080a17476bf9f3461c (diff)
Create a thread_local cache for textLocale
Bug:22378829 toLanguageTag is significantly more expensive than previously thought (note ULOC_FULLNAME_CAPACITY is 157) and weighs in at around 40us. Given that this is called on every Paint and that there are typically thousands of Paint objects created this adds up very quickly. Given that the locale is almost always Locale.getDefault(), a very simple thread_local cache of size 1 fixes this trivially Change-Id: I819e60cac7a4b27e9dd5538332c22ce5bbd0851c
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions