libmapbox-maps.so grew ~38% (+18 MB across ABIs) between 11.30.4 and 11.31.1
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 22/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- mobile, mobile-dev, performance
Hướng nghiên cứu
The report compares stripped libmapbox-maps.so sizes inside android-core-ndk27 AARs (11.30.4 vs 11.31.1) and ELF sections, especially .text. Start from the gl-native / NDK27 build configuration used for those artifacts and whether optimization, inlining, or LTO flags changed. Done is a confirmed cause and a path to shrink the library, not an app-side workaround. This is maintainer-level native build work, not a first-issue patch.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Environment
- Android OS version: All (build-time / APK size issue)
- Devices affected: All
- Maps SDK Version: 11.31.1 and later (
com.mapbox.maps:android-ndk27), compared with 11.30.4
Observed behavior and steps to reproduce
After updating from com.mapbox.maps:android-ndk27:11.30.4 to 11.31.1, with no other native changes, our release APK grew by about 20 MB. Almost all of the difference is libmapbox-maps.so from com.mapbox.maps:android-core-ndk27:
| ABI | 11.30.4 | 11.31.1 | Change |
|---|---|---|---|
| arm64-v8a | 12.93 MB | 17.83 MB | +4.90 MB |
| armeabi-v7a | 8.87 MB | 12.19 MB | +3.32 MB |
| x86 | 14.80 MB | 19.36 MB | +4.56 MB |
| x86_64 | 14.28 MB | 19.35 MB | +5.07 MB |
That is about +18 MB in a universal APK, and about +5 MB per device for arm64. The size stays at this level in 11.32.0. libmapbox-common.so (common 24.30.4 to 24.31.1) is unchanged (6.67 MB to 6.64 MB on arm64-v8a).
To reproduce: compare the jni/<abi>/libmapbox-maps.so sizes inside android-core-ndk27-11.30.4.aar and android-core-ndk27-11.31.1.aar.
Expected behavior
The 11.31.0 and 11.31.1 release notes list small features and bug fixes, so we would expect the native library size to stay close to 11.30.4.
Notes / preliminary analysis
Both libraries are stripped, so this is not debug symbols. Comparing ELF section sizes of the arm64-v8a libmapbox-maps.so:
| Section | 11.30.4 | 11.31.1 | Change |
|---|---|---|---|
.text |
8.45 MB | 12.73 MB | +4.28 MB (+51%) |
.gcc_except_table |
0.43 MB | 0.75 MB | +0.33 MB |
.rela.dyn |
0.69 MB | 0.95 MB | +0.26 MB |
.data.rel.ro |
0.24 MB | 0.33 MB | +0.09 MB |
.eh_frame |
1.51 MB | 1.58 MB | +0.07 MB |
.eh_frame_hdr |
0.39 MB | 0.23 MB | -0.16 MB |
Most of the growth is compiled code in .text, with exception tables almost doubling. That looks more like a change in build configuration (optimization level, inlining or LTO settings) than new functionality. Could you confirm whether the gl-native build flags changed in 11.31, and whether the size can be brought back down?
We have only checked the -ndk27 variant, so we don't know whether the default (NDK 23) artifact is affected as well.
- Ngôn ngữ chính
- Kotlin
- Star
- 578
- Fork
- 163
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của mapbox/mapbox-maps-android
-
bug :beetle:
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
mapbox/mapbox-maps-android#2727 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
mapbox/mapbox-maps-android#2733 ·
-
Pins Flicker During Zoom OutĐang mởbug :beetle:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 50/100
mapbox/mapbox-maps-android#2732 ·
-
[R8] Maps and Search SDK consumer rules apply app-wide and significantly restrict optimizationĐang mởauto-triaged bug :beetle:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 45/100
mapbox/mapbox-maps-android#2731 · 4 reaction ·
-
bug :beetle:
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
mapbox/mapbox-maps-android#2730 ·
Tất cả issue của mapbox/mapbox-maps-android
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
droidconKE/droidconKeKotlin#426 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Crash on Android 14+ when installing extensions: missing FOREGROUND_SERVICE_SHORT_SERVICE permissionĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
keiyoushi/extensions-source#19757 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
maplibre/maplibre-native-ffi#792 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày