helix-website icon indicating copy to clipboard operation
helix-website copied to clipboard

feat(rum-oversight): unroll scoreCWV loop in util

Open karlpauls opened this issue 1 year ago • 2 comments

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=

karlpauls avatar Aug 14 '24 12:08 karlpauls

This is currently for the oversight, but it seems to be applicable to the Explorer. Can the patch be applied there too ?

kptdobe avatar Aug 20 '24 13:08 kptdobe