Performance
509 bites tagged Performance: interview questions with model answers, and 60-second explainers.
Test yourself: Top 30 Performance interview questions →Multiple choice, with the correct answer and why it is correct on every question. Free, no sign-in.Go expands experimental portable SIMD APIs
The Go project describes experimental SIMD APIs across amd64, arm64, and wasm, including a portable interface intended to reduce assembly work.
Prerendering vs SSR in SvelteKit: trade-offs?
Prerender generates static HTML at build, SSR renders on each request, prerender wins on speed but requires static data.
How does NODE_ENV=production change Express behavior?
NODE_ENV is a convention signal, production disables verbose logging and enables caching.
WebSocket optimization for high-frequency data?
Large payloads increase latency, frequent tiny messages waste overhead, solutions include compression, selective fields, and batching.
postMessage vs SharedArrayBuffer in worker_threads tradeoffs?
Structured cloning copies data, SharedArrayBuffer shares memory.
Using personas to drive technical decisions
Derive constraints like device, network, accessibility from personas; let them shape framework, payload shape, performance budgets.
Diagnose a slow, laggy Figma prototype
Heavy raster images and effects, layer and node count, and excessive prototype interactions.
SVG icons versus icon fonts: technical trade-offs
SVG is vector markup, crisp, multicolor, accessible, and tree-shakeable; icon fonts ship as glyphs, risk anti-aliasing blur, accessibility hacks, and load-failure boxes. Advocate SVG for modern apps.
Runtime CSS-in-JS performance pitfalls in SSR Next.js
Runtime libs serialize styles per render, need style collection on the server, risk FOUC and double work in App Router.
Threading of native module methods
Methods run on a dedicated native module queue, not the UI thread; long blocking work stalls other module calls; offload to a background executor or override methodQueue, returning results via promise.
The legacy React Native Bridge architecture
JS, native, and shadow threads communicate via an async, batched, JSON-serialized Bridge.
Why the New Architecture Replaced the Bridge
The old bridge was async, serialized to JSON, and a single batched channel causing latency; JSI replaces it with direct synchronous C++ interop.
Why react-native-gesture-handler Replaces the Responder System
The JS responder system runs on the JS thread so gestures lag under load; gesture-handler runs recognition natively for smooth, reliable gestures.
Debouncing a Search TextInput with Hooks
Keep input in state, in an effect set a timer that fires the search after a delay, clear the timer on each change so only the final pause triggers the call.
StyleSheet.create and Inline Style Tradeoffs
Styles are JS objects of subset-CSS properties; StyleSheet.create validates them and yields stable references, while inline objects allocate each render.
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.
Contrast the legacy bridge with JSI
Bridge is async, serialized JSON, and batched; JSI enables direct synchronous C++ calls with no serialization, cutting latency and enabling lazy native modules.
How do you move a 500ms blocking task off the JS thread?
Offload to a native module or C++ TurboModule, a worklet/worker thread, or chunk the work and yield; never block JS.
What is bridge traffic and what causes dropped frames?
The bridge passes batched, serialized JSON messages between JS and native asynchronously; high-frequency events flood it.
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.
What is Hermes and its advantages over JSC?
Hermes is an open-source engine optimized for RN, with faster startup via precompiled bytecode and lower memory use.
useMemo and useCallback for stable references
UseMemo caches a computed value, useCallback caches a function identity across renders; both prevent recompute and unnecessary re-renders of memoized children.
Cost of console.log and production-safe debugging
Each console.log serializes data and, when devtools are attached, crosses the bridge synchronously, blocking the JS thread; strip logs in release and use Flipper, dev tools, or remote crash and analytics tools.
FlatList and list virtualization
Use FlatList (or SectionList) which virtualizes, rendering only items near the viewport and recycling as you scroll, unlike ScrollView which mounts everything.
Get Performance bites daily.
Five a day, five minutes, offline. With quizzes so it sticks.
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.