~/talk

Two memory leak stories in the story of flipkart.com

Talkat React India 2024 · 2024-10-15..10-19· [web-performance, frontend-architecture]
slides:none on file

Two real bugs at Flipkart: a fetch-cancellation pattern using promise.race + timer not cleared leaves full response objects reachable and causes an out‑of‑memory crash under a sudden ~100k RPS spike (process dies in ~4s); fix: clear the timeout (or use AbortController) so the fetch reference drops. The other is a module‑scope array that accumulates 65,000 CSS chunk strings over weeks, slowly blocking the event loop and raising latency; fix: dedupe with a Set or check before push. Diagnosis uses Chrome DevTools heap snapshots via node inspect.

AI-written summary · about

  1. 0:00Introduction to memory leaks
  2. 3:09Load testing and spike failures
  3. 5:57Understanding memory growth
  4. 9:31Debugging with heap snapshots
  5. 14:02First leak: Uncleared timeouts
  6. 16:26Performance testing process
  7. 18:33Unexplained latency increase
  8. 21:02Second leak: CSS chunks array
  9. 24:10Fixes and long-term impact
  10. 26:15Conclusion and tools gratitude
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.