Android patch: Lazily load ICU transliteration rules
ICU 73 / 74 added am_Ethi-am_Ethi/Geminate and other transliteration
rule. The am_Ethi-am_Ethi/Geminate is 6932-line long, and ~180 KB in
the daivik heap.
Instead of loading it in zygote during device boots, this CL changes
to lazily load the rules from the .dat file.
Transliterator isn't the most commonly used API on Android. Even when
it's used, it usually doesn't need to load and parse all the rules
provided by the system ICU.
It saves 1.1 MB from the zygote heap.
Bug: 331291118
Test: atest CtsIcuTestCases:android.icu.dev.test.translit
Change-Id: Ie0a9c987ad570fb59c297b813b5a9b4e9c145597
4 files changed