Skip to content

Instantly share code, notes, and snippets.

View tryggvigy's full-sized avatar
🌚
Web developer at Spotify working on Web Player and Desktop clients

Tryggvi Gylfason tryggvigy

🌚
Web developer at Spotify working on Web Player and Desktop clients
  • Spotify
  • Stockholm, Sweden
View GitHub Profile
@tryggvigy
tryggvigy / react-virtualized-framerate-test.js
Last active June 24, 2020 22:10 — forked from bvaughn/react-virtualized-framerate-test.js
Quick demonstration of a way to measure scrolling performance for react-virtualized in an automated way
/** Measures framerate for the time between start() and stop() calls */
function FramerateMeasurer () {
this.start = () => {
this._beginTime = ( performance || Date ).now()
this._frames = 0
this._animationFrameId = requestAnimationFrame(this._loop)
}
this.stop = () => {
const endTime = ( performance || Date ).now()