helix-website
helix-website copied to clipboard
feat(rum-oversight): unroll scoreCWV loop in util
The scoreCWV method is using a loop that can be unrolled to improve performance (as it doesn't gc as much)
Description
Since the method gets very hot, it seems to produce less gc if it doesn't keep creating a list for the values (the code looks a little more verbose).
Motivation and Context
Speedup the scoreCWV method
How Has This Been Tested?
Looking at the ui rendering speed in the console at
https://utilunroll--helix-website--karlpauls.hlx.page/tools/oversight/explorer.html?domain=aem.live&domainkey=
| Page | Scores | Audits | ||
|---|---|---|---|---|
| M | /tools/oversight/explorer.html?domain=aem.live&domainkey= | |||
| D | /tools/oversight/explorer.html?domain=aem.live&domainkey= |
This is currently for the oversight, but it seems to be applicable to the Explorer. Can the patch be applied there too ?