Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Issue 587833004: Turn on UCONFIG_NO_NON_HTML5_CONVERTER to save 100kB (Closed)

Created:
6 years, 3 months ago by jungshik at Google
Modified:
6 years, 3 months ago
Reviewers:
Mark Mentovai, jsbell
CC:
chromium-reviews
Visibility:
Public.

Description

Turn on UCONFIG_NO_NON_HTML5_CONVERTER UCONFIG_NO_NON_HTML5_CONVERTER was added earlier to our copy of ICU, but it was never set to 1. It's my oversight. 1. Turns UCON..CONVERTER on in icu.gyp to drop all the encodings not required by the Encoding spec. Dropped encodings include UTF-7, BOCU, SCSU, CESU, ISCII, ISO-2022-{KR, CN*}, HZ-GB, ISO-2022-JP's other than the original. 2. A lot more sections of the ICU converter code are excluded when it's set to 1 including the code for LMB (Lotus Multibyte) encodings and X11 compound text encoding (icu common). 3. The character encoding detections for encodings excluded are also disabled. (icu i18n) 4. ISO-2022-{KR, CN*} and HZ-GB can be dropped now because Blink treats them as replacement encoding. The corresponding alias entries from convertrs.txt are also removed. 5. ibm-874 was removed. We used to need it before Blink started, but not any more. We only need windows-874. 6. A mistaken in convertrs.txt was corrected : Big5-HKSCS was pointing to an old mapping table. 7. Per ICU upstream's suggestion, use '-html' suffix instead of '-html5' for the encoding tables derived from the WHATWG's encoding spec (ibm866, shift_jis and euc-jp). The static 64-bit release build of Chrome on Linux went down from 141,596,616 to 141,491,968 bytes (~ 100 kB reduction). Besides, the icu data size got smaller by ~ 19 kB ( 10,490,576 to 10,471,008 bytes). See http://bugs.icu-project.org/trac/ticket/11296 for an upstream bug I've filed on the issue. BUG=76328 TEST=browser_tests --gtest_filter="*ncoding*" TEST=net_unittest --gtest_filter="*ilenameUtil*" TEST=base_unittests --gtest_filter="*Conv*" TEST=Blink: fast/encoding/* TEST=With shared library build, the following has no match. nm libicuuc.so | egrep -i '(bocu|scsu|utf7|2022kr|2022cn|iscii)' nm libicui18n.so | egrep -i '(2022kr|2022cn|ibm42)' TEST=With static library build, the following has no match. nm chrome | egrep -i '(bocu|scsu|utf7|2022kr|2022cn|iscii|ibm42)' R=jsbell@chromium.org, mark@chromium.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=292131

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Total comments: 3

Patch Set 4 : #

Patch Set 5 : more tests added to desc #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10612 lines, -23709 lines) Patch
M README.chromium View 1 chunk +5 lines, -6 lines 0 comments Download
M android/icudtl.dat View Binary file 0 comments Download
M icu.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M patches/converters.patch View 6 chunks +14 lines, -60 lines 0 comments Download
M patches/uconv.patch View 9 chunks +565 lines, -51 lines 0 comments Download
M scripts/ibm866_gen.sh View 1 chunk +2 lines, -0 lines 0 comments Download
M source/common/ucnv2022.cpp View 33 chunks +58 lines, -26 lines 0 comments Download
M source/common/ucnv_bld.cpp View 5 chunks +21 lines, -5 lines 0 comments Download
M source/common/ucnv_cnv.h View 1 chunk +3 lines, -4 lines 0 comments Download
M source/common/ucnv_ct.c View 1 chunk +1 line, -1 line 0 comments Download
M source/common/ucnv_lmb.c View 1 chunk +1 line, -1 line 0 comments Download
M source/common/ucnvhz.c View 2 chunks +2 lines, -2 lines 0 comments Download
M source/common/unicode/urename.h View 1 chunk +0 lines, -2 lines 0 comments Download
M source/data/in/icudtl.dat View Binary file 0 comments Download
M source/data/mappings/convrtrs.txt View 5 chunks +9 lines, -13 lines 0 comments Download
A + source/data/mappings/euc-jp-html.ucm View 0 chunks +-1 lines, --1 lines 0 comments Download
D source/data/mappings/euc-jp-html5.ucm View 1 chunk +0 lines, -13624 lines 0 comments Download
D source/data/mappings/ibm-866_html5-2012.ucm View 1 chunk +0 lines, -274 lines 0 comments Download
A source/data/mappings/ibm866-html.ucm View 1 chunk +274 lines, -0 lines 0 comments Download
A source/data/mappings/shift_jis-html.ucm View 1 chunk +9633 lines, -0 lines 0 comments Download
D source/data/mappings/shift_jis-html5.ucm View 1 chunk +0 lines, -9633 lines 0 comments Download
M source/data/mappings/ucmlocal.mk View 4 chunks +5 lines, -8 lines 0 comments Download
M source/i18n/csdetect.cpp View 2 chunks +2 lines, -0 lines 0 comments Download
M source/i18n/csr2022.h View 2 chunks +2 lines, -0 lines 0 comments Download
M source/i18n/csr2022.cpp View 4 chunks +4 lines, -0 lines 0 comments Download
M source/i18n/csrsbcs.h View 4 chunks +4 lines, -0 lines 0 comments Download
M source/i18n/csrsbcs.cpp View 6 chunks +6 lines, -0 lines 0 comments Download

Messages

Total messages: 11 (1 generated)
jungshik at Google
Mark, can you check if the way I changed icu.gyp is correct among other things ...
6 years, 3 months ago (2014-09-23 21:51:51 UTC) #2
Mark Mentovai
https://codereview.chromium.org/587833004/diff/30001/icu.gyp File icu.gyp (right): https://codereview.chromium.org/587833004/diff/30001/icu.gyp#newcode24 icu.gyp:24: 'UCONFIG_NO_NON_HTML5_CONVERSION=1', Is this needed? It’s only needed if UCONFIG_NO_NON_HTML5_CONVERSION ...
6 years, 3 months ago (2014-09-23 21:59:03 UTC) #3
jsbell
nothing stood out as obviously wrong in the ICU changes, so those lgtm There was ...
6 years, 3 months ago (2014-09-24 17:44:35 UTC) #4
jungshik at Google
https://codereview.chromium.org/587833004/diff/30001/icu.gyp File icu.gyp (right): https://codereview.chromium.org/587833004/diff/30001/icu.gyp#newcode24 icu.gyp:24: 'UCONFIG_NO_NON_HTML5_CONVERSION=1', On 2014/09/23 21:59:03, Mark Mentovai wrote: > Is ...
6 years, 3 months ago (2014-09-24 20:56:48 UTC) #5
jungshik at Google
https://codereview.chromium.org/587833004/diff/30001/icu.gyp File icu.gyp (right): https://codereview.chromium.org/587833004/diff/30001/icu.gyp#newcode24 icu.gyp:24: 'UCONFIG_NO_NON_HTML5_CONVERSION=1', On 2014/09/24 20:56:48, Jungshik Shin wrote: > On ...
6 years, 3 months ago (2014-09-24 21:06:11 UTC) #6
jungshik at Google
Thank you, Joshua and Mark. Mark, can you take another look?
6 years, 3 months ago (2014-09-24 21:07:03 UTC) #7
jungshik at Google
On 2014/09/24 17:44:35, jsbell wrote: > nothing stood out as obviously wrong in the ICU ...
6 years, 3 months ago (2014-09-24 21:08:29 UTC) #8
Mark Mentovai
LGTM (but Rietveld won’t let show me a diff of icu.gyp between patch sets 2 ...
6 years, 3 months ago (2014-09-24 21:10:15 UTC) #9
jungshik at Google
On 2014/09/24 21:10:15, Mark Mentovai wrote: > LGTM (but Rietveld won’t let show me a ...
6 years, 3 months ago (2014-09-24 23:44:11 UTC) #10
jungshik at Google
6 years, 3 months ago (2014-09-25 00:17:54 UTC) #11
Message was sent while issue was closed.
Committed patchset #5 (id:50001) manually as r292131 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698