Reduce the data size by filtering supplemental data
Size changes:
65-1 . 64-2
7786368 7777488 android/icudtl.dat
6412768 6427344 android_small/icudtl.dat
1418320 1394480 android_small/icudtl_extra.dat
5060080 5108144 cast/icudtl.dat
10481216 10450592 chromeos/icudtl.dat
10505952 10426816 common/icudtb.dat
10505952 10426816 common/icudtl.dat
900576 . 901808 flutter/icudtl.dat
6375984 6377520 ios/icudtl.dat
1. Filter supplementalData by keeping fields only if referenced by the code.
calendarData source/i18n/erarules.cpp
calendarPreferenceData source/i18n/calendar.cpp source/i18n/ucal.cpp
cldrVersion source/i18n/ulocdata.cpp
codeMappings source/i18n/region.cpp
idValidity source/i18n/region.cpp
measurementData source/i18n/ulocdata.cpp
territoryContainment source/i18n/region.cpp
timeData source/i18n/dtptngen.cpp
weekData source/i18n/dtptngen.cpp
weekData%variant source/i18n/dtptngen.cpp
The following fields will be dropped because there's no code reference in ICU, Chrome and v8:
codeMappingsCurrency
languageData
languageMatching
languageMatchingInfo
languageMatchingNew
parentLocales
subdivisionContainment
territoryInfo
unitPreferenceData
weekOfPreference
To verify that they're not needed by running the following command:
find -type f |egrep -v "./data/"|xargs egrep "(codeMappingsCurrency|languageData|languageMatching|parentLocales|subdivisionContainment|territoryInfo|unitPreferenceData|weekOfPreference)"
under icu4c/source in ICU65 tree.
2. add back dnam in unit to prepare for extension of Intl.DisplayNames
Note that ICU 65-1 comes with a new file langInfo.res which is needed by the
new LocaleMatcher API. The languageMatching* fields in supplementalData,
although named very similar to that, is not used by the implementation of
LocaleMatcher* API. We also search the chromium code and found no references
to these fields name in chromium tree.
See https://cs.chromium.org/search/?q=%5B%5EA-Za-z0-9%5D(codeMappingsCurrency%7ClanguageData%7ClanguageMatching%7CparentLocales%7CsubdivisionContainment%7CterritoryInfo%7CunitPreferenceData%7CweekOfPreference)%5B%5EA-Za-z0-9%5D&type=cs
Bug: chromium:1014272
Change-Id: I5f8ce7f3a9a37539cb1ca077f08d9750155a14af
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/deps/icu/+/1880815
Reviewed-by: Jungshik Shin <jshin@chromium.org>
15 files changed