Skip to content
tezvyn:

Top 30 Profiling Interview Questions and Answers

30 multiple-choice questions on Profiling, drawn from 30 bites out of the 35 tagged Profiling on Tezvyn. Answer them here or read straight down. Every question carries the correct option, why it is correct, and a link to the bite it came from.

30 questions. Pick an answer, or open “Show the answer” to read it.

Answers are graded in your browser. Nothing is saved, and no XP or streak is earned here. The app keeps score.

  1. Question 1 of 30

    What is the primary effect of enabling inline requires in a React Native app?

    Show the answer

    Answer: a · It defers a module's evaluation until the first time it is actually used

    Inline requires transform top-level imports so a module is evaluated lazily on first use, cutting startup work. It does not compile to machine code (that is closer to Hermes bytecode) nor perform tree shaking, which is a separate bundler concern.

    Read the full bite: Improving React Native startup time

  2. Question 2 of 30

    When systematically diagnosing a memory leak using Android Studio's Memory Profiler, which sequence of steps is most effective?

    Show the answer

    Answer: a · Observe memory during suspect actions, repeatedly force GC to check for baseline shifts, capture a heap dump if a new baseline forms, and analyze the dump for retained objects and their reference chains.

    The systematic process involves observing memory, confirming a leak by forcing garbage collection and noting if memory fails to return to a baseline, then capturing a heap dump for detailed analysis of retained objects and their reference paths. Other options either miss critical diagnostic steps or rely on less systematic methods.

    Read the full bite: How do you diagnose a memory leak with Android Studio Profiler?

  3. Question 3 of 30

    After repeatedly performing an action suspected of causing a memory leak, what is the most effective diagnostic step within the Android Memory Profiler?

    Show the answer

    Answer: a · Force a garbage collection, then capture a heap dump to analyze object references if memory usage remains high.

    Forcing a garbage collection is a critical step to ensure you are analyzing objects that are truly leaked, not just transient objects waiting to be collected. Simply observing the graph confirms a problem but doesn't help find the source.

    Read the full bite: How do you diagnose a memory leak using the Android Studio Profiler?

  4. Question 4 of 30

    After capturing a heap dump that shows multiple retained Activity instances, what is the most direct way to identify the object preventing their garbage collection?

    Show the answer

    Answer: a · Inspect the reference chain from a retained Activity instance to its nearest garbage-collection root

    Tracing the reference chain to the nearest GC root reveals the exact retaining object—such as a static field or lingering listener—that keeps the Activity alive after rotation. The CPU Profiler diagnoses computation overhead rather than reference retention, while inspecting only large objects or allocation counts cannot distinguish a true leak from legitimate memory use.

    Read the full bite: Which Android Studio Profiler tool diagnoses high memory usage and leaks?

  5. Question 5 of 30

    Which scenario is Time Profiler LEAST effective at diagnosing as the primary cause of an app's performance issue?

    Show the answer

    Answer: c · An app becoming unresponsive while awaiting a large network response.

    Time Profiler is designed for CPU-bound performance issues, identifying where the CPU spends its time. It is less effective for I/O-bound problems like network waits, where the CPU is idle, as other tools are better suited to show why a thread is waiting.

    Read the full bite: Xcode's Time Profiler: Hunting Down Performance Bottlenecks

  6. Question 6 of 30

    What is a significant limitation to consider when using the Android Studio Profiler for performance measurement?

    Show the answer

    Answer: b · The overhead from its instrumentation means performance metrics may not perfectly reflect a normal user's experience.

    The card states that "The instrumentation it adds creates performance overhead, so the numbers you see are not 100% true to a normal user's experience," directly supporting option B. While powerful, the Profiler is explicitly noted as "not a replacement for automated benchmark tests" (option C), which are better for catching regressions over time.

    Read the full bite: Android Studio Profiler: Find Your App's Bottlenecks

  7. Question 7 of 30

    Adding GPU workers yields diminishing throughput gains. What is the most common root cause to investigate first?

    Show the answer

    Answer: d · Gradient synchronization communication overhead growing with worker count and interconnect limits

    Data-parallel training all-reduces gradients each step, and that communication cost grows with workers and is bounded by interconnect speed, capping scaling. Learning rate and parameter count do not explain sublinear scaling.

    Read the full bite: Diagnosing poor distributed training scaling

  8. Question 8 of 30

    For which task is the React DevTools Profiler primarily designed?

    Show the answer

    Answer: a · Identifying components that cause excessive re-renders or slow commits during development.

    The Profiler's core purpose is to diagnose performance issues like slow renders and unnecessary updates in development mode. Option C is incorrect because the card explicitly states it's not for absolute, real-world performance metrics or production benchmarking.

    Read the full bite: React DevTools Profiler: Find Performance Bottlenecks

  9. Question 9 of 30

    What is the most critical reason a React <Profiler> component's onRender callback might not execute when deployed in a production environment?

    Show the answer

    Answer: d · The application is deployed with a standard production build, which disables the <Profiler> component by default.

    The card explicitly states that <Profiler> is disabled in standard production builds by default, and its onRender callback will not be called unless a special profiling production build is enabled. Option C describes a general condition for the callback not firing, not a production-specific failure of the profiler itself.

    Read the full bite: Measure Component Render Costs with <Profiler>

  10. Question 10 of 30

    When using profiling tools to diagnose RN jank, what most directly indicates a blocked JavaScript thread?

    Show the answer

    Answer: d · A long synchronous block in the JS flame graph aligned with an FPS dip

    A long synchronous task in the JS flame graph coinciding with dropped frames shows the JS thread is blocked. Network bursts indicate I/O, not a starved event loop.

    Read the full bite: Which two Flipper plugins diagnose an unresponsive UI?

  11. Question 11 of 30

    While analyzing a Go CPU flame graph, you see a wide encoding/json.Marshal block near the bottom with a narrower runtime.mallocgc block directly above it. What should you conclude?

    Show the answer

    Answer: a · JSON serialization as a whole is the bottleneck because width represents cumulative CPU time.

    Block width in a CPU flame graph represents cumulative CPU time for that function and everything it calls, so a wide json.Marshal means the serialization path overall is the bottleneck. The most tempting distractor confuses width with invocation count, but a narrow block may be called millions of times while a wide block called rarely dominates CPU.

    Read the full bite: Generate a Go CPU profile and visualize it as a flame graph

  12. Question 12 of 30

    When hunting a memory leak in a Go service, why is inuse_space more useful than alloc_space?

    Show the answer

    Answer: b · inuse_space shows memory still retained after GC, so its steady growth signals a leak; alloc_space counts cumulative allocation including freed memory

    inuse_space reflects currently retained memory, so rising inuse across snapshots indicates a leak; alloc_space is cumulative allocation that stays high even when memory is freed. The roles are not swapped and the metrics are not identical.

    Read the full bite: Diagnosing Go memory leaks with pprof heap profiles

  13. Question 13 of 30

    Before using perf annotate to map cache-miss counters to Rust source, what build configuration is essential?

    Show the answer

    Answer: c · A release build with debug symbols enabled so perf can map addresses to source lines

    You profile optimized release code but must keep debug symbols so perf maps sampled addresses back to functions and lines. A debug build distorts hotspots, and perf needs symbol info, not raw source access.

    Read the full bite: Profiling a Rust hot loop with perf

  14. Question 14 of 30

    Which pattern across two heap snapshots most reliably indicates a memory leak?

    Show the answer

    Answer: b · Object counts of a constructor that grow each cycle and never drop after GC

    Monotonic growth that survives GC across repeated cycles signals a leak. A spike that disappears or settles is normal allocation, not a leak.

    Read the full bite: How do you debug a memory leak with Hermes heap snapshots?

  15. Question 15 of 30

    What is the primary performance bottleneck when a React Native virtualized list scrolls poorly in the classic architecture?

    Show the answer

    Answer: a · Saturation of the async bridge and JS thread coordinating frequent UI updates

    Fast scrolling floods the serialized bridge and can saturate the JS thread, dropping frames; virtualization and Fabric/JSI address this. Raw JS math speed, native incapacity, and CSS specificity are not the cause.

    Read the full bite: Performance trade-offs of abstracting native UI

  16. Question 16 of 30

    Which best explains why Go's standard library provides built-in HTTP profiling endpoints while Rust's does not?

    Show the answer

    Answer: c · Go's runtime already maintains profiling state, so exposing it via HTTP is a low-cost side effect, whereas Rust avoids runtime overhead and leaves profiling to external tools or explicit dependencies.

    Go's bundled runtime already maintains profiling counters for its scheduler and garbage collector, so exposing them via HTTP is nearly free, whereas Rust's zero-cost design pushes observability to explicit crates or OS-level tools. Option A is tempting but wrong because it claims Go's approach adds significant overhead, when in fact the runtime already incurs that cost and the HTTP layer is a minor side effect.

    Read the full bite: Compare Go and Rust approaches to exposing profiling data

  17. Question 17 of 30

    Why is tracking both JS thread FPS and UI thread FPS important for performance regressions?

    Show the answer

    Answer: a · Jank can originate on either thread, so one metric alone can miss the cause

    Stutter can come from a blocked JS thread or stalled native rendering, so both must be measured. They are not identical, and native rendering can indeed stall.

    Read the full bite: How do you catch RN performance regressions?

  18. Question 18 of 30

    Profiling reveals the app's CPU sits at only 30 percent during a choppy scroll, yet frames still drop. What is the most likely explanation?

    Show the answer

    Answer: d · A single synchronous call on the main thread blows the per-frame budget even though average CPU is low

    Hitches come from main-thread work exceeding the frame budget at the wrong moment, independent of average CPU. Low utilization does not imply smooth frames, so the hardware-defect answer is wrong.

    Read the full bite: Diagnosing choppy scrolling performance

  19. Question 19 of 30

    Which scenario best illustrates the appropriate use of React Native's Performance Monitor?

    Show the answer

    Answer: c · Quickly confirming a suspicion of UI jank during development.

    The Performance Monitor is a quick, in-app guide for immediate feedback during development to confirm suspected issues like UI jank. It is explicitly not for accurate measurements, deep analysis, or final profiling before release, which require native tools.

    Read the full bite: React Native's Performance Monitor Overlay

  20. Question 20 of 30

    For which scenario is System Tracing the most effective diagnostic tool in a React Native Android app?

    Show the answer

    Answer: d · Pinpointing the exact thread causing UI animations to stutter and drop frames.

    System Tracing is specifically designed to diagnose UI performance bottlenecks like stuttering animations and dropped frames by showing where time is spent across key threads within the 16ms frame budget. It is explicitly stated not to be used in Development Mode (implied by 'debug build') and is not for general JavaScript logic errors or network performance.

    Read the full bite: Profiling React Native on Android with System Tracing

  21. Question 21 of 30

    An endpoint has high latency but the server's CPU sits near idle while many requests wait. What does this most likely indicate?

    Show the answer

    Answer: d · An I/O-bound bottleneck such as slow queries or a saturated connection pool

    Idle CPU combined with requests waiting points to I/O-bound work like slow database or upstream calls. High CPU usage would instead signal a CPU-bound problem, so adding workers would not help here.

    Read the full bite: Diagnosing a slow FastAPI endpoint under load

  22. Question 22 of 30

    For which scenario would Go's pprof CPU profiler be least effective in identifying the root cause of slowness?

    Show the answer

    Answer: b · A web service is slow because it's waiting on responses from an external API.

    The card explicitly states that pprof's CPU profiler is not for blocking operations like waiting on network requests. Therefore, a slow external API call (Option B) would not be effectively diagnosed by the CPU profiler, unlike the CPU-bound issues described in the other options.

    Read the full bite: Go's pprof: Finding Your Code's Hotspots

  23. Question 23 of 30

    What is the primary advantage of using Node.js perf_hooks over Date.now() for measuring code execution duration?

    Show the answer

    Answer: a · It provides a stable, monotonic clock that ensures reliable measurements.

    The card states that perf_hooks provides a stable, monotonic clock, which is crucial for reliable duration measurements as it's unaffected by system time changes, unlike Date.now(). It also advises against using perf_hooks for measuring wall-clock time.

    Read the full bite: Node.js perf_hooks: A High-Precision Stopwatch for Your App

  24. Question 24 of 30

    When investigating a potential memory leak in a Go application using pprof, which profile type is most effective for identifying memory that is currently retained and not garbage collected?

    Show the answer

    Answer: b · The heap profile, because it shows the memory that is currently reachable and in use.

    The heap profile specifically captures the memory that is currently allocated and reachable by the program, making it ideal for identifying memory leaks where objects are retained unintentionally. The allocs profile, while showing all allocations, includes memory that has already been freed, which can obscure actual leaks.

    Read the full bite: Go Memory Profiling with pprof

  25. Question 25 of 30

    For which scenario is the Go Execution Tracer the most appropriate diagnostic tool?

    Show the answer

    Answer: c · Understanding why goroutines are frequently blocked or experiencing high lock contention.

    The Go Execution Tracer is specifically designed to diagnose complex concurrency issues like high lock contention and blocked goroutines by visualizing runtime events. It is not intended for continuous production monitoring due to its overhead, nor is it the primary tool for CPU-bound issues or memory leak detection.

    Read the full bite: Go Execution Tracer: Pinpointing Concurrency Bottlenecks

  26. Question 26 of 30

    What is the primary advantage of using Perfetto for complex system performance analysis?

    Show the answer

    Answer: c · Correlating application-specific events with kernel and system activity on a unified timeline.

    Perfetto's core strength lies in its ability to unify data from the application layer, system services, and the kernel onto a single timeline, allowing users to correlate events and diagnose complex, system-wide performance issues like jank. Option B is incorrect because the card explicitly states Perfetto is overkill for simple, isolated logic debugging.

    Read the full bite: Perfetto: See Your Whole System on One Timeline

  27. Question 27 of 30

    Why might a team prefer a sampling profiler over an instrumenting profiler when diagnosing a production latency issue?

    Show the answer

    Answer: b · Sampling profilers add low overhead, so they distort timings less under load

    Sampling has low, predictable overhead, making it safer under production load. Instrumenting profilers capture exact counts but their per-call overhead can distort the very timings you are measuring.

    Read the full bite: Performance Profiling

  28. Question 28 of 30

    When using Dart DevTools to optimize a Flutter application's performance, which statement is most accurate?

    Show the answer

    Answer: a · The tool provides precise data to pinpoint specific functions causing performance bottlenecks like "jank."

    Dart DevTools is designed to provide precise data, like flame charts, to identify specific functions or code segments causing performance issues such as "jank." The card explicitly states that performance decisions should not be based on debug mode profiles due to skewed results; instead, profile mode should always be used.

    Read the full bite: Profiling Flutter Apps with Dart DevTools

  29. Question 29 of 30

    When analyzing a Flutter CPU flame chart, what does the width of a bar primarily represent?

    Show the answer

    Answer: a · The percentage of total CPU time consumed by that function and its children.

    The card explicitly states that the x-axis represents the percentage of CPU time consumed, so a wider bar indicates a greater proportion of CPU time. Option D is a common misconception, as the x-axis is for sorting calls alphabetically, not showing execution order.

    Read the full bite: Find Jank with Flutter's CPU Flame Charts

  30. Question 30 of 30

    To visualize a custom app operation like model hydration as a first-class track alongside CPU and memory metrics in Instruments, what is required?

    Show the answer

    Answer: a · Emit os_signpost begin/end calls in your code and author a custom instrument package that maps those events to UI tracks.

    The card describes os_signpost as a two-part system: begin/end sensors in code plus a custom instrument package that renders them as tracks. The third option is tempting because signposts are indeed the correct sensors, but the built-in Time Profiler is blind to internal app semantics and cannot visualize them without the custom package.

    Read the full bite: Build Custom Instruments with os_signpost

Could you explain these out loud?

That is what an interview actually tests. Tezvyn gives you questions like these with what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon