Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

[iOS] Static lib size x2 from 3.4.2 to 3.5.2 #9021

Closed

Description

@RomainQuidet

Platform: iOS
Mapbox SDK version: 3.5.2

Steps to trigger behavior

  1. Build the static library in release mode

Expected behavior

static lib size should be quite the same as previous 3.4.2 version (Mapbox.framework is 103MB).

Actual behavior

static lib size of 3.5.2 Mapbox.framework is 264MB

Seems that strip is correctly run over the static lib, so the issue is somewhere else.

Activity

  1. RomainQuidet commented on May 17, 2017

    @RomainQuidet
    ContributorAuthor

    I gave a try with http://stackoverflow.com/questions/19992463/ios-static-library-compiled-with-xcode-remembers-its-source-files.
    This works : In LLVM code generation, set Generate debug symbols to No and Symbols hidden by default to Yes. For some reason, even if you tell it to strip symbols, it's not going to do it unless these are set.

    Static Mapbox lib went from 264MB to 163MB. Still bigger than 3.4.2, but much better.

  2. added
    iOS
    on May 17, 2017
  3. RomainQuidet commented on May 17, 2017

    @RomainQuidet
    ContributorAuthor

    Another strange behavior, if I extract slices from the static lib, arm slices are still twice the size of intel ones:

    -rw-r--r-- 1 mappy staff 155M 17 mai 15:14 Mapbox
    -rw-r--r-- 1 mappy staff 56M 17 mai 15:14 Mapbox-arm64
    -rw-r--r-- 1 mappy staff 24M 17 mai 15:14 Mapbox-x86

    I just ran
    'lipo -thin x86_64 Mapbox -output Mapbox-x86'
    and the same with arm64 on the newly stripped Mapbox static lib (155MB)

  4. RomainQuidet commented on May 17, 2017

    @RomainQuidet
    ContributorAuthor

    I'm making some more tests about arm slices and will make a PR for the release static lib

  5. fabian-guerra commented on May 17, 2017

    @fabian-guerra
    Contributor

    Hi.
    Thank you for reporting this issue, v3.5.1 was built with Xcode 8.3 that caused Mapbox iOS SDK 3.5.1 to be 2× larger than 3.5.0. Download v3.5.2 also you may need to update your Xcode to latest version.
    As reference this is the radar.

  6. RomainQuidet commented on May 17, 2017

    @RomainQuidet
    ContributorAuthor

    This is not related to this xcode issue. I just built both mapbox versions with xcode 8.3.2, the issue is there. It is neither an issue with Mapbox updated version but an issue with Strip command vs new llvm version. It now needs the correct flags at compile time to be able to strip...

  7. added this to the ios-v3.6.0 milestone on May 17, 2017
  8. RomainQuidet commented on May 17, 2017

    @RomainQuidet
    ContributorAuthor
  9. RomainQuidet commented on May 17, 2017

    @RomainQuidet
    ContributorAuthor

    Just run
    make ipackage-strip FORMAT=static BUILDTYPE=Release
    before and after the PR, you'll see framework size going from 266MB to 162MB

  10. modified the milestones: , ios-v3.6.0 on Jun 22, 2017
  11. removed this from the milestone on Sep 18, 2017
  12. friedbunny commented on Jan 5, 2018

    @friedbunny
    Contributor

    Closing this as won’t-fix — see our understanding framework size doc for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildiOS

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions