Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by vvG94KbDUtRa on Wednesday May 06, 2020 @08:30PM
(#23098230)
Spoken like someone who has never tried to optimize startup time. If network is your blocker, you need to do it as soon as possible
[ Parent
| on HN ]
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by saagarjha on Wednesday May 06, 2020 @08:37PM
(#23098280)
Putting more code in a constructor is almost never advised. I would expect that whatever connection the Facebook SDK is making is not a blocker for application launch. (If you have more insight on why this code must unconditionally run this early, I would be glad to hear it.)
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by munchbunny on Thursday May 07, 2020 @02:14AM
(#23100219)
The gain from trying to eke out a millisecond by executing network or filesystem I/O code before main() is extremely marginal compared to the can of worms opened by doing that.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by jfkebwjsbx on Wednesday May 06, 2020 @08:41PM
(#23098307)
Running code before main has nothing to do with performance.
Re:Facebook iOS SDK Remotely Crashing Spotify, TikTok, Pinte...
by unilynx on Thursday May 07, 2020 @05:32AM
(#23101229)
It surely does, performance is more about just raw CPU. Prefetching data (even a DNS query) reduces the latency the user perceives.
The web similarly added the various <link rel=preload, dns-prefetch> tags, so things can be connected and fetched before the JS/CSS code is ready