AdvancediOS icon indicating copy to clipboard operation
AdvancediOS copied to clipboard

Should we build dependencies as static and link them to the Core target to improve launch times?

Open n8chur opened this issue 7 years ago • 2 comments

This should increase application launch times significantly as the number of dependencies increases.

In theory this should be as easy as:

  1. Write a script that creates a temporary.xcconfig file that contains MACH_O_TYPE = staticlib and then $ export XCODE_XCCONFIG_FILE="$xcconfig" before running carthage build
  2. In the project.yml reference the dependency file directly with framework: Carthage/Build/iOS/Static/XXX.framework of carthage: xxx
  3. Add -all_load to the Core target's OTHER_LDFLAGS build setting (OTHER_LDFLAGS = $(inherited) -all_load in the Core target's .xcconfig)

n8chur avatar Nov 14 '18 18:11 n8chur

I started working on this on the static-core branch.

n8chur avatar Nov 15 '18 18:11 n8chur

I'm not seeing an improvement in launch times. I'll have to try this again once more dependencies are added.

n8chur avatar Nov 15 '18 19:11 n8chur