New issue
Advanced search Search tips

Issue 718955 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Bug



Sign in to add a comment

Customize the ICU data file for iOS

Project Member Reported by js...@chromium.org, May 5 2017

Issue description

iOS uses iOS's WebView so that some of ICU data is not necessary on iOS. 
(NO v8 for Ecma 402 implementation, no line breaking, etc) 

Moreover, as is the case on Android, it can use (and with Michael's recent CL, it does) the native API for language display names. 


 
Project Member

Comment 1 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/deps/icu.git/+/4b06aadd0556135d3a90a4eb03eca24ef249e03e

commit 4b06aadd0556135d3a90a4eb03eca24ef249e03e
Author: Jungshik Shin <jshin@chromium.org>
Date: Fri May 05 21:40:31 2017

Customize the ICU data for iOS

Add ios/icudtl.dat and ios/patch_locale.sh.

Update README.chromium and BUILD.gn accordingly.
Update scripts/copy_data.sh to take (ios|common|android).

At the moment, iOS data is almost identical to that of Android, but in the future
more cuts may be made (e.g. dictionary data for breakiterator).

Bug:  718955 
TEST: iOS Chrome works as before.
Review-Url: https://codereview.chromium.org/2743123002 .

[modify] https://crrev.com/4b06aadd0556135d3a90a4eb03eca24ef249e03e/BUILD.gn
[modify] https://crrev.com/4b06aadd0556135d3a90a4eb03eca24ef249e03e/README.chromium
[add] https://crrev.com/4b06aadd0556135d3a90a4eb03eca24ef249e03e/ios/icudtl.dat
[add] https://crrev.com/4b06aadd0556135d3a90a4eb03eca24ef249e03e/ios/patch_locale.sh
[modify] https://crrev.com/4b06aadd0556135d3a90a4eb03eca24ef249e03e/scripts/copy_data.sh

Project Member

Comment 2 by bugdroid1@chromium.org, May 5 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a9abb8f16cb14dd210cd5de4a7b6dbc2209059e6

commit a9abb8f16cb14dd210cd5de4a7b6dbc2209059e6
Author: Jungshik Shin <jshin@chromium.org>
Date: Fri May 05 23:46:13 2017

Roll ICU to 4b06aa from b34251f

The only substantial change is adding a separate ICU data file for iOS

http://chromium.googlesource.com/chromium/deps/icu.git/+log/b34251f..4b06aad

BUG= 718955 
TEST=Build iOS target (debug), unittests on iOS

Change-Id: Ic1896e45283415d50f605e580893be7eb857048f
Reviewed-on: https://chromium-review.googlesource.com/498128
Reviewed-by: Mike Dougherty <michaeldo@chromium.org>
Commit-Queue: Jungshik Shin <jshin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#469809}
[modify] https://crrev.com/a9abb8f16cb14dd210cd5de4a7b6dbc2209059e6/DEPS

Comment 3 by js...@chromium.org, May 8 2017

Need to check if encoding conversion is necessary for iOS. Dropping all the converter tables would save about 500kB. 

GURL does use them, but iOS may not need a part of GURL requiring encoding conversion. 

One way to test is to disable encoding conversion code in ICU and see if there's any compile error. 

Oh... that won't work if GURL does use encoding conversion. Anyway, we can try that method. 

However, that trick (disabling ICU code that uses a category of ICU data to see if that data is necessary) would work for breakiterator. CJK dictionary is already dropped so that there is not huge saving in line, but still hundreds of kBs can be saved by dropping Thai, Khmer, Lao, Myanmar dictionaries and line/word break rule files. 


Comment 4 by js...@chromium.org, May 22 2018

Status: Fixed (was: Started)

Sign in to add a comment