Why does Script Evaluation take so long?

Markus Müller picture Markus Müller · May 25, 2019 · Viewed 8.6k times · Source

I'm using gatsbyjs and tried to optimize my webpage (https://www.rün.run) as much as possible. Running PageSpeed gives me some decent results. What I'm wondering is, why Script Evaluation is taking so long? My js bundle size is only 257 kb (gzipped) large.

It looks like the react hydration is taking the time. So is it because of react? Or has my DOM tree to many elements?

Direct link to PageSpeed: https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.xn--rn-xka.run%2FKalista%2Fadc&tab=mobile

My goal is also to get only mobile a value of 100. How can I improve any further?

Answer

Artem Matiushenko picture Artem Matiushenko · Jan 23, 2020

Yes, it seems that rehydrate takes this time. I have tried it with simple component which contains just a text, and still, there is some (quite long for that case) time for main-thread work & JavaScript execution time. And the same thing if you will test https://store.gatsbyjs.org/

But anyway, even due to this issue results with gatsby really great