Slides for my talk at JSFoo about building the new version of abof.com from scratch using React.
More info at https://blog.alarisprime.com/e-commerce-case-study-building-faster-listing-pages-on-abof-com-part-1-cb99231a1e8a
building abof.comankur sethi[email protected]
View Slide
>20 secondsbefore something showed up on the screen on a 3gconnection
time to first paint
abof’s numbers
time to first paint on 3gtime in seconds05101520before after2.6s20s
page load time on 3gtime in seconds07142128before after9.4s27s
http://bit.ly/2bBESNF
three principles
be impatientstart painting to the screen as early as possible
be lazydo as little work on the device as possible
set quotasfor payload size, number of requests, memory usepretty much all your computing resources
tech stack
speed payload toolingserverrenderingpeoplereact✅ ⚠ ✅ ✅ ✅angular2✅ ⚠ vue✅ ✅ ⚠ ⚠ riot✅ ✅ ⚠ ⚠
reduxwebpackbabelgulpand others
architecture
page load strategyhttp://www.abof.com/women/clothing/dresses
stage 1: html
stage 2: javascriptwhich then loads images, account information, etc.asynchronously
stage 3: everythingelsethird party scripts, analytics, etc.
why?
perception of speed
first 12 productsmeasure to discover what works best for you
how?
universal renderingor isomorphic rendering
react-dom
react-native
renderToString()
prioritize user intentuser wants to look at dresses, not account information
first react takes over
then it fills in the blanks• product images• account information• loved products• bag items• site footer
progressiveenhancementand good old fashioned respect
analytics
queue analytics events
redux middleware
phew
app performancetalk to me!
testing load timeswebpagetest, pagespeed insights, and your eyeballsget drunk on 12th main
testing appperformancetest on real devices
questions?
[email protected]