开发者

iOS linked frameworks affecting load time?

开发者 https://www.devze.com 2023-04-10 19:47 出处:网络
I\'ve got an iOS app that links to 15 Apple frameworks (including the ~3 basic ones every app开发者_高级运维 uses). I\'ve noticed that my app\'s load time, and time restoring from the background, is p

I've got an iOS app that links to 15 Apple frameworks (including the ~3 basic ones every app开发者_高级运维 uses). I've noticed that my app's load time, and time restoring from the background, is pretty high, though the executable is only 600kb. Could all these frameworks be the cause of the load time issue? And is it possible to, say, lazily-load frameworks as needed?


Yes dynamically linked frameworks do affect load time, you can see this in instruments using the time profiler. You should see dyload running as your app launches and it will take time to load in each framework.

Even worse if have static code in something like +initialize this will run at load time too, further slowing your app.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号