HackerTrans
TopNewTrendsCommentsPastAskShowJobs

sond813

no profile record

Submissions

A reliable, open-source way to profile iOS apps

github.com
5 points·by sond813·3년 전·0 comments

How to speed up conformance checks in Swift by ~20%

emergetools.com
5 points·by sond813·3년 전·1 comments

The Surprising Cost of Protocol Conformances in Swift

emergetools.com
59 points·by sond813·5년 전·12 comments

comments

sond813
·3년 전·discuss
Congrats on the launch!
sond813
·3년 전·discuss
Apple recommends 400ms for startup time because that's how long the app open animation takes. It's also hard to tell from just one flamegraph how long it will really take in prod, that's why the percentages are nice to use. I've mostly used percentiles like p95 to track and prioritize mobile perf work. 600ms on one phone could be 2s on older hardware with other factors slowing it down, but it depends on the distribution of doordash users.
sond813
·4년 전·discuss
We've seen this happen with system fonts as well, apps sometimes bundle the San Francisco font with an app instead of relying on a system font. There may be some reasons to include the font or sound file, such as if it changes in different versions of the OS. Of course that would make the app inconsistent with the rest of the OS, which may not be the best behavior. We discuss some other tradeoffs with bundling these system resources on our blog post which covers the Spark app: https://www.emergetools.com/blog/posts/7AppsThatCouldSaveYou...
sond813
·4년 전·discuss
I tried it out with Yelp and Twitter, both had a lot of bloat due to not stripping binaries. You can see this in the large "String Table" in both screenshots.

Yelp also has a large exports section for the main app binary, that's usually a sign of a problem because the main binary doesn't need to export any symbols, only frameworks do that.

Twitter has a handful of 4MB images, much bigger than images you'd expect in an app. I took a look at a few of these and they are just gradient background images that could have been drawn with something like core graphics to completely eliminate the need for an image.

Twitter: https://emergeassets.s3.us-west-1.amazonaws.com/Screen+Shot+...

Yelp: https://emergeassets.s3.us-west-1.amazonaws.com/Screen+Shot+...
sond813
·5년 전·discuss
Building up the cache at launch/dynamic link time does have a performance hit of a few ms, but if you know it will save you many runtime checks it can be worth it. Definitely makes sense for the runtime to have the lazy behavior built in. Hopefully the dyld cache will help get the best of both solutions by persisting a cache across multiple launches.
sond813
·5년 전·discuss
It’s ms, that slow because every protocol conformance in every dylib needs to be checked. When this gets to 100k+ like in many large apps it takes multiple milliseconds
sond813
·5년 전·discuss
Looks like a great improvement to my workflow, does it require write access to GitHub or can it be read only? Any plans to support GitLab?