๐
Performance tips
Reduce Cumulative Layout Shift
Reduce Cumulative Layout Shift by always showing the scrollbar
css
html {overflow-y: scroll;}
twitter.com/TimVere...16533248
Performance API
js
performance.mark('start')// some code we want to measureperformance.mark('end')
Benchmarking code using node
sh
# assume there's an `add` function that is executed in benchmark.jsnode --trace-opt benchmark.js | grep addnode --trace-opt --trace-deopt benchmark.js | grep add# add %NeverOptimizeFuntion(add)node --allow-natives-syntax benchmark.js