-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Optionally exclude CJK glyphs from offline downloads #13607
Conversation
@LukasPaczos For the Android implementation I didn't see any automated tests (outside of the core tests), but I just manually tested changing the value in OfflineActivity. |
platform/macos/macos.xcworkspace/xcshareddata/xcdebugger/Breakpoints_v2.xcbkptlist
Outdated
Show resolved
Hide resolved
813c766
to
3c76d8d
Compare
@LukasPaczos My initial Android implementation has the same issue @1ec5 noted in the iOS implementation: the addition of an extra parameter to the What do you think is the idiomatic way to handle this? Create a second constructor that takes the extra argument? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good on the iOS/macOS front. Suggested iOS/macOS changelog blurb:
Added the
MGLOfflineRegion.includesIdeographicGlyphs
property, which you can set toNO
to exclude CJK glyphs and save space. (#13607)
eb46bd8c7f6b982d308d47dd2e76be15b65816d7 fixes some Auto Layout misplaced view warnings by adding constraints to the checkbox and updating the buttons’ constraints. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think is the idiomatic way to handle this? Create a second constructor that takes the extra argument?
Yes, the best way would be to create a second constructor with the extra argument which is called by the original constructor with the default value as the extra argument.
...d/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/offline/OfflineRegionDefinition.java
Outdated
Show resolved
Hide resolved
platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/maps/MapboxMap.java
Outdated
Show resolved
Hide resolved
eb46bd8
to
0cff39a
Compare
OK, I think we're good to go, thanks for the help, everybody! ~450 lines touched to add a boolean flag. 😬 |
0cff39a
to
822ea18
Compare
This is a proof-of-concept for a fix to issue #11561 -- for small offline packs, the size of the pack is dominated by the space taken up by CJK glyphs, even though many or most people won't use them:
For a z1/z2 offline region of Satellite Streets, it looks like excluding CJK glyphs brings the bundle size down from ~90MB to ~12MB.
Currently the code defaults to the existing behavior of including the glyphs. We should consider defaulting to excluding the glyphs.
TODO:
cc @1ec5 @lloydsheng @kkaefer