~/talk

Lessons learned from a React performance nightmare

Talkat ITNEXT Summit 2019 · on Wednesday, 2019-10-30· [react, javascript]
links:none on file
slides:none on file

A back-office React app with Redux holds up to 26 weeks of data, 50 cards per week, and spikes to 1,300 campaigns in memory (infinite scroll can push it toward 10,000). Performance collapses from shallow prop comparisons caused by transforming serialized calendar-week strings into objects in selectors, and from an external activeCampaignId forcing all cards to re-render. Fixes: move transforms into components or use reselect to memoize, store active flags inside each campaign, pass IDs instead of full objects, and connect components locally rather than lifting props.

AI-written summary · about

  1. 0:00Introduction
  2. 1:15What happened
  3. 2:10Campaigns
  4. 3:16Requirements
  5. 4:54Sample code
  6. 5:20Wasted renders
  7. 6:30Data transforms
  8. 7:20Demo
  9. 14:47The Obvious Choice
  10. 15:35Why was it bad
  11. 16:48How we solved it
  12. 19:25Prop Lifting
  13. 20:07Endpoints
  14. 20:37Examples
  15. 22:35Why you only pass in the user ID
  16. 22:52Why you only pass in the campaign list
  17. 25:41Dont lift props
~/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.