Performance and debugging interview questions
47 questions from real iOS interviews. Topics: Instruments, launch time, scroll performance, crash analysis, app size.
- Performance and debuggingShort answer
Xcode debugging features
Once you've reproduced a bug, which Xcode debugging features do you actually reach for, beyond print statements? And when do you pull out each one?
#xcode #debugging #breakpoint #lldb
- Performance and debuggingMultiple choice
Breakpoints
Which of these can you do with Xcode breakpoints without changing any code? Select all that apply.
#xcode #breakpoint #debugging
- Performance and debuggingMultiple choice
Picking an Instruments template
Tapping a certain button freezes the screen for about a second. To see which function on the main thread is eating the time, which Instruments template do you …
#instruments #time-profiler
- Performance and debuggingMultiple choice
Data structure choice and performance
With the same 100,000 elements stored in each, which operations are clearly faster on a Set (NSSet) than on an Array? Select all that apply.
#array #set #complexity #hash
- Performance and debuggingMultiple choiceAppleinterview report
Performance measurement conditions
You want to measure app performance as the basis for optimization. Which are correct measurement practices? Select all that apply.
#measurement #release #device #profiling
- Performance and debuggingShort answerAppleinterview report
Instruments profiling
All you've got is vague feedback that "the app is slow." How do you approach that with Instruments?
#instruments #time-profiler #allocations #profiling
- Performance and debuggingShort answer
Crash investigation process
You get an alert that crashes spiked in the version you shipped yesterday. What do you do, and in what order?
#crash #crashlytics #organizer #triage
- Performance and debuggingShort answerAppleinterview report
Crash log symbolication
A user sends you a crash log and it only has hex addresses instead of function names. What do you need to make it readable?
#crash #dsym #symbolication #crash-log
- Performance and debuggingMultiple choice
Identifying crash types
A crash report shows EXC_BREAKPOINT (SIGTRAP). In a Swift app, which of these situations produce this type? Select all that apply.
#crash #exc_breakpoint #sigtrap #swift-runtime
- Performance and debuggingShort answer
os_signpost intervals
Someone reports that search results take too long to appear. Instead of printing timestamps, what would you use to measure each stage?
#os_signpost #logger #instruments #points-of-interest
- Performance and debuggingMultiple choice
Causes of scroll stutter
You inherit an app whose UICollectionView stutters while scrolling. Which of these can cause the stutter? Select all that apply.
#scroll #main-thread #offscreen-rendering #autolayout
- Performance and debuggingShort answerGoogleinterview report
Navigation stack optimization
Because of deep links or state restoration you have to push dozens of view controllers onto a UINavigationController in a row. What goes wrong if you just do t…
#uinavigationcontroller #memory #view-controller #navigation
- Performance and debuggingMultiple choice
Matching a diagnostic tool
An app you're debugging in Xcode throws an intermittent EXC_BAD_ACCESS, and you don't know which object is being accessed after it was deallocated. Which diagn…
#zombies #exc_bad_access #debugging
- Performance and debuggingShort answerTikTok
Approach to code optimization
You're asked to "optimize this function, it's slow." What do you do before you touch the code?
#optimization #measurement #algorithm #profiling
- Performance and debuggingShort answerWalmart
Spotting memory leaks and crashes in production
A hiring manager asks: "How do you find out there's a memory leak in an app that's already shipped, not one you're developing?" Answer separately for local too…
#memory-leak #production #crash #metrickit
- Performance and debuggingShort answerPayPal
Where to start on scroll stutter
On a phone screen the interviewer asks: "A user reports that scrolling stutters. Where would you start?" Walk through the diagnostic order and what you look at…
#scroll #hitch #time-profiler #main-thread
- Performance and debuggingMultiple choiceKuaishou
Computing decoded image memory
You decode a 100×100 pixel RGBA PNG (3KB on disk) to draw it on screen. Which value is closest to the memory the bitmap takes?
#image #memory #bitmap #png
- Performance and debuggingMultiple choiceDiDi
Crash collection for shipped apps
For an app already on the App Store, which of these are ways to detect and collect crashes? Select all that apply.
#crash #production #organizer #metrickit
- Performance and debuggingShort answerMeta
Using system resources efficiently
A phone screen question: "When you design an iOS app, what do you keep in mind to use system resources (CPU, memory, network, battery, disk) efficiently?" Give…
#energy #battery #memory #network
- Performance and debuggingShort answerXiaomi
Finding the cause of freezes
Reviews of your shipped iOS app say it occasionally stops responding to touch for a few seconds. When it won't reproduce in the office, how do you get your han…
#hang #main-thread #metrickit #profiling
- Performance and debuggingShort answerComcastinterview report
Leak investigation with Instruments
Opening and closing a certain screen repeatedly makes the app's memory keep growing. In what order would you use Leaks, Allocations, and the Memory Graph?
#instruments #leaks #allocations #memory-graph
- Performance and debuggingShort answer마이리얼트립interview report
Baselines for performance improvements
You're reviewing a PR that claims the search results screen got 40% faster. It looks like it mixes the author's laptop simulator numbers with QA's real device …
#performance #baseline #p95 #regression
- Performance and debuggingShort answer중고나라interview report
Correlating crashes with performance
Reviews of a secondhand marketplace app keep saying "it gets slow and then closes." How do you connect crash logs with performance traces to decide which probl…
#crash #symbolication #performance #observability
- Performance and debuggingShort answer뤼튼
React Native performance boundaries
A chat screen built with React Native is slow on iOS. How do you separate whether the bottleneck is JavaScript rendering, calls across the native boundary, or …
#react-native #bridge #profiling #ios
- Performance and debuggingShort answerTikTok
Detecting OOM terminations
Users say "the app just closes," but Crashlytics has nothing. If you suspect out-of-memory (OOM) terminations, how do you confirm it and gather data?
#oom #jetsam #metrickit #memory
- Performance and debuggingShort answer
Responding to memory warnings
A photo editing app gets frequent memory warnings and sometimes gets killed. In what order would you track down the cause?
#memory-warning #image #nscache #downsampling
- Performance and debuggingShort answer
App launch time
You take over an app whose cold start takes more than 3 seconds. How would you split up and measure the launch time?
#launch-time #dyld #pre-main #app-launch
- Performance and debuggingMultiple choice
Pre-main optimization
Which of these actually reduce the pre-main part of app launch (before main() is called)? Select all that apply.
#launch-time #dyld #pre-main #mergeable-libraries
- Performance and debuggingShort answerTikTok
Memory bug diagnosis tools
Besides retain cycle leaks, what other kinds of memory bugs do you run into on iOS? And if one took you a long time to track down, which kind was it?
#memory #leaks #zombies #memory-graph
- Performance and debuggingShort answer
Diagnosing hangs
Users report that a certain screen occasionally freezes for about a second, but you can't reproduce it in development. How do you narrow down the cause?
#hang #main-thread #metrickit #thread-performance-checker
- Performance and debuggingShort answer
App size optimization
Your app's download size is over 200MB and users get the cellular download warning. How do you analyze where the size comes from?
#app-size #app-thinning #asset-catalog #on-demand-resources
- Performance and debuggingMultiple choice
Reading Animation Hitches
You recorded scrolling with the Instruments Animation Hitches template. Which statements about reading the result are correct? Select all that apply.
#hitch #animation-hitches #instruments #commit
- Performance and debuggingMultiple choiceMicrosoft
Post-main launch optimization
You want to cut app startup time. Which of these actually shorten the post-main stage, from main() to the first frame? Select all that apply.
#launch-time #post-main #first-frame #didfinishlaunching
- Performance and debuggingShort answerTrip.com
Memory pressure from large images
You need to show a single 50MB photo on screen. If you just load it with UIImage(contentsOfFile:), how much memory does it take?
#image #downsampling #imageio #memory
- Performance and debuggingShort answerTencent
Building an in-app hang monitor
You want to add a feature to your in-house APM that captures a stack whenever the main thread stalls past a threshold. How would you detect jank from inside th…
#hang #runloop #watchdog #main-thread
- Performance and debuggingShort answerMeituan
CPU vs GPU bottlenecks in dropped frames
Can you explain the causes of dropped frames, split into the CPU side and the GPU side?
#frame-drop #gpu #cpu #offscreen-rendering
- Performance and debuggingMultiple choiceXiaohongshu
Finding where the main thread is blocked
After a certain action the app freezes completely (no input response). Which of these are valid ways to find where the main thread is blocked? Select all that …
#hang #main-thread #deadlock #debugging
- Performance and debuggingShort answer티맵모빌리티interview report
Battery optimization for navigation apps
Map and navigation apps use a lot of battery. How would you design one to minimize battery drain while keeping location tracking accurate?
#battery #energy #location #core-location
- Performance and debuggingShort answer밀리의서재interview report
Adopting and running app monitoring (APM)
If you were introducing monitoring like Sentry or Firebase Crashlytics to a team for the first time, which metrics would you define?
#monitoring #sentry #crashlytics #release-health
- Performance and debuggingShort answerHSBCinterview report
Instrumenting a 5 second screen load
The account detail screen in a banking app takes 5 seconds to first display. To avoid fixing on gut feeling, into which stages would you split and measure thos…
#performance #signpost #time-profiler #loading
- Performance and debuggingShort answer네이버interview report
Large image pipeline
An iOS feature that edits and saves photos of tens of MB gets killed after a memory warning. From decoding to saving, how would you lower the memory peak?
#images #downsampling #memory #imageio
- Performance and debuggingShort answer더스윙interview report
Analyzing scroll hitches
A photo feed collection view stutters while scrolling. How do you use Instruments to tell whether the cause is image decoding, layout computation, or cell setu…
#scrolling #core-animation #prefetch #performance
- Performance and debuggingShort answer
Reading the Time Profiler call tree
You run Time Profiler and 80% of main thread time lands in CA::Transaction::commit or UIKit internals. Your own code doesn't show up. How do you read this resu…
#time-profiler #call-tree #instruments #sampling
- Performance and debuggingShort answer
ARC traffic optimization
In Time Profiler, the top entries on the scrolling hot path are swift_retain, swift_release, and swift_bridgeObjectRetain. Why does this happen?
#arc #swift_retain #time-profiler #borrowing
- Performance and debuggingMultiple choice
MetricKit
Which of these can an app actually receive through MetricKit (MXMetricManager)? Select all that apply.
#metrickit #diagnostics #hang #crash
- Performance and debuggingShort answerAppleinterview report
Investigating unreproducible production bugs
You have a production bug that affects 0.1% of users and never reproduces in development. How do you approach it?
#debugging #oslog #observability #feature-flag
- Performance and debuggingShort answerKuaishou
Designing a crash reporting system
You can't use third-party SDKs, so you have to design your own crash log collection. How do you catch and record a crash inside the app?
#crash-reporting #signal #mach-exception #dsym