diff options
author | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-09 20:47:23 +0100 |
---|---|---|
committer | Edward Welbourne <edward.welbourne@qt.io> | 2020-01-30 17:58:15 +0100 |
commit | 4e84a8b29f13169a75c734920e953d3157768bca (patch) | |
tree | d8d67c2a2f10ec11a1ecdf18898727a627611622 /src/corelib/text/qlocale.cpp | |
parent | 264ed73052513015caafaf146286cf63aaa68b03 (diff) |
Deduplicate locale data tables
Some entries in tables were sub-strings (e.g. prefixes) of others.
Since we store start-index and length (with no need for terminators),
any entry that appears as a sub-string of an earlier entry can be
recorded without making a separate copy of its content, just by
recording where it appeared as a sub-string of an earlier entry.
(Sadly this doesn't apply to month- or day-names and their
short-forms: for those, we store ';'-joined lists. Thus, although
each short-form is a prefix of its long-form, the short-form is stored
in a list with other short-forms; and this is not a prefix of the list
of matching long-forms.)
The savings are modest (780 bytes at present), but cost us nothing
except when running the python script that generates the data files
(it takes a little longer now), which usually only happens at a CLDR
update.
Change-Id: I05bdaa9283365707bac0190ae983b31f074dd6ed
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/corelib/text/qlocale.cpp')
0 files changed, 0 insertions, 0 deletions