istio.io icon indicating copy to clipboard operation
istio.io copied to clipboard

High CPU usage on istio.io homepage

Open GregHanson opened this issue 4 years ago • 5 comments

Seeing at least 60% CPU usage on the Istio.io homepage on Safari, Chrome and Firefox browsers on my Mac. No CPU spike on the other pages on the site, only the main page. Similar .io website rarely hit double digits.

GregHanson avatar Aug 12 '21 15:08 GregHanson

It will be the particle animation (https://github.com/istio/istio.io/blob/master/src/ts/headerAnimation.js). It uses Three.js to draw the waves.

Options include: improve performance of the JS, convert it from canvas/JS to pure CSS rendering, replace it with a static graphic, remove it entirely.

Marking "help wanted" as the vendor who built this is not longer available to us.

craigbox avatar Aug 12 '21 16:08 craigbox

@craigbox The graphic was my guess as well. tetrate.io was one of the other sites I checked, and it has a moving graphic on the homepage and the site doesn't hit the double digits. I didn't check their source to see how it was done but figured the CPU comparisons warranted opening an issue at least for tracking purposes.

GregHanson avatar Aug 13 '21 14:08 GregHanson

Theirs is a looping .webm video. Perhaps Tetrate have some frontend devs who could have a look at istio.io for us? 🙂 @ZackButcher

craigbox avatar Aug 13 '21 18:08 craigbox

Hello, This is an intersting one and Would take this up and investigate further. As @craigbox mentioned, it should be caused due the animations and usage of high GPU and Rendering required to process for istio landing page.

Request to assign it to me.

image image

ravikiranr26 avatar Jan 26 '22 13:01 ravikiranr26

Thanks for taking this on @ravikiranr26 !

craigbox avatar Jan 26 '22 21:01 craigbox

this is still an ongoing issue

GregHanson avatar Nov 28 '23 18:11 GregHanson

My knowledge of Three.js is a bit rusty but I have an idea on why the cpu is affected. I will take a look into this when I have a bit of time and I will rewrite it to work in a more efficient way

leosarra avatar Dec 08 '23 13:12 leosarra

Wonderful work @leosarra. Thank you!

craigbox avatar Dec 11 '23 22:12 craigbox