mozilla / perfcompare

Improved Performance Comparison Tool
Mozilla Public License 2.0
39 stars 93 forks source link

Generate the results blob on click instead of at render time #696

Closed julienw closed 2 months ago

julienw commented 2 months ago

I was looking at the performance of the results page with the react profiler tool, and found that the DownloadButton component was using more time than it should have. So here is a small patch to fix that.

I tested manually that clicking the button was still responsive, even with the "browsertime" framework selection.

There are existing tests covering this piece of functionality that didn't need any change.

netlify[bot] commented 2 months ago

Deploy Preview for mozilla-perfcompare ready!

Name Link
Latest commit 86e5394541c298e0cdc95845f2175948be7a7c7c
Latest deploy log https://app.netlify.com/sites/mozilla-perfcompare/deploys/66a8ed100b99860008a5bbca
Deploy Preview https://deploy-preview-696--mozilla-perfcompare.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 88.36%. Comparing base (3de8272) to head (b51c41d). Report is 2 commits behind head on beta.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## beta #696 +/- ## ========================================== - Coverage 88.43% 88.36% -0.07% ========================================== Files 75 75 Lines 1893 1891 -2 Branches 349 349 ========================================== - Hits 1674 1671 -3 - Misses 185 186 +1 Partials 34 34 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.