Skip to content
tezvyn:

Profiling

35 bites tagged Profiling — interview questions with model answers, and 60-second explainers.

React Native1 min read

How do you catch RN performance regressions?

Track TTI, JS and UI thread FPS, and memory; baseline them and gate CI with automated tools like Flashlight, using the React profiler and DevTools to diagnose. performance strategy and metrics.

React Native1 min read

How do you debug a memory leak with Hermes heap snapshots?

Take a baseline snapshot, exercise the suspect flow repeatedly, snapshot again, and compare retained sizes and object counts that grow monotonically. heap analysis workflow.

React Native1 min read

Which two Flipper plugins diagnose an unresponsive UI?

Use the React DevTools profiler to find expensive renders and the Performance/Hermes plugin to spot a blocked JS thread or low FPS. practical profiling workflow.

React Native1 min read

Improving React Native startup time

Enable Hermes for fast bytecode startup, shrink and lazy-load the JS bundle via inline requires and RAM bundles, and defer non-critical native init. systematic startup profiling.

Python & FastAPI2 min read

Diagnosing a slow FastAPI endpoint under load

Add timing and tracing to isolate the slow span, watch CPU vs wait time and event-loop lag, then use profilers like py-spy or cProfile and DB EXPLAIN. Systematic performance diagnosis.

Monitoring & SRE1 min read

Performance Profiling

Profiling measures where a program actually spends its time and resources, attributing CPU cycles, memory, or wall-clock latency to specific functions or call paths. It replaces guesswork with data so optimization effort targets the real bottleneck.

MLOps & Infrastructure1 min read

Diagnosing poor distributed training scaling

Communication overhead (gradient all-reduce, interconnect), data-loading starvation, load imbalance, and small per-GPU batches; profile with the PyTorch profiler and Nsight. distributed training bottlenecks.

Design Systems1 min read

Performance trade-offs of abstracting native UI

Bridge/serialization overhead, JS-thread bottlenecks for lists, and mitigations like virtualization, native modules, and profiling both threads. cost of cross-platform abstraction.

iOS & Swift1 min read

Diagnosing choppy scrolling performance

Reach for Instruments, especially the Time Profiler and Core Animation/Hangs tools, and look for main-thread work and dropped frames. profiling discipline over guessing. blindly optimizing without measuring first.

Go & Rust1 min read

Profiling a Rust hot loop with perf

Build with debuginfo, perf record cycles or cache-misses, perf report then perf annotate to map counters to source/asm; flamegraph for hotspots. low-level performance profiling.

Go & Rust1 min read

Diagnosing Go memory leaks with pprof heap profiles

Expose net/http/pprof, grab /debug/pprof/heap, analyze inuse_space for live retention versus alloc_space for cumulative allocation; rising inuse over time points to a leak. production profiling with pprof.

React Native2 min read

React DevTools Profiler: Find Slow Renders

The Profiler is a stopwatch for your component tree. It records why each render happened and how long it took, so you can spot unnecessary re-renders in React Native. The footgun is chasing render counts instead of actual frame time.

iOS & Swift2 min read

Profiling iOS Memory with Instruments

Instruments X-rays your heap to catch objects that outstay their welcome. Profile image-heavy features or when jetsam kills your app. Never trust Simulator memory numbers; always validate on physical hardware.

iOS & Swift2 min read

Build Custom Instruments with os_signpost

os_signpost turns code intervals into Instruments graphs by pairing begin-end markers with a visualization package. Use it to correlate app work like model hydration with system CPU and memory metrics. Unmatched begin-end calls break tracks and ruin the view.

Go & Rust2 min read

Compare Go and Rust approaches to exposing profiling data

Contrast Go's pprof import with Rust crates or profilers, noting runtime versus OS-level sampling. Trade-offs between Go's pull model and Rust's push or attach models. Claiming Rust has a std-lib pull endpoint like Go.

Go & Rust2 min read

Generate a Go CPU profile and visualize it as a flame graph

This tests Go profiling workflow and flame graph literacy. A good answer covers net/http/pprof setup, go tool pprof collection, flame graph generation, and reading width as cumulative CPU time and height as call depth. Red flag: width means call count.

Go & Rust2 min read

Profiling Rust with Linux perf

perf samples CPU stacks thousands of times per second to map where your Rust binary spends time without code changes. Use it on Linux to find hot functions in a slow release build. Omitting debug symbols or frame pointers gives mangled names and broken stacks.

Flutter & Dart2 min read

Flutter Performance Overlay

Flutter's Performance Overlay is a real-time EKG for frame budgets. Two graphs reveal whether Dart UI work or GPU rasterization is causing jank during animations. The footgun is rewriting widget logic when the raster thread is actually the bottleneck.

Android & Kotlin2 min read

Which Android Studio Profiler tool diagnoses high memory usage and leaks?

Heap dump, check retained size for leaked Activities, trace reference chains to root retainer. Memory Profiler expertise and systematic leak diagnosis. Naming CPU profiler or saying "look for big objects."

Android & Kotlin2 min read

How do you diagnose a memory leak using the Android Studio Profiler?

This tests your practical skill with the Android Memory Profiler, not just theory. A great answer involves capturing a heap dump, filtering for unreachable objects, and inspecting the reference tree to find the leak's source.

Android & Kotlin2 min read

How do you diagnose a memory leak with Android Studio Profiler?

This tests your systematic process for debugging memory issues. A good answer outlines using the Memory Profiler, forcing GC, capturing heap dumps, and analyzing object references. A red flag is just naming the tool without explaining the 'how'.

React & Next.js2 min read

Measure Component Render Costs with <Profiler>

React's `<Profiler>` is a stopwatch for your components, measuring render times programmatically. Wrap any UI tree to log detailed performance metrics on every update, helping you pinpoint slow renders. The footgun: It's disabled in production by default.

React & Next.js2 min read

React DevTools Profiler: Find Performance Bottlenecks

The React Profiler records how long components take to render, helping you find performance bottlenecks. Use it to diagnose slow interactions and see which components re-render too often.

React Native2 min read

Profiling React Native on Android with System Tracing

System Tracing helps you find UI jank on Android by showing where time is spent in each 16ms frame. Use it in Android Studio to diagnose stuttering animations by inspecting the UI, JS, and Native Module threads.

Get Profiling bites daily.

Five a day, five minutes, offline. With quizzes so it sticks.

Open testing — you’ll join as an early tester.