M
M
MRcracker2020-04-29 10:31:52
JavaScript
MRcracker, 2020-04-29 10:31:52

How to optimize Script Evaluation?

Noticed. what does google show when analyzing a Script Evaluation site and asks to reduce the work in the main thread. How to solve this problem and what is it connected with? Did I understand correctly. What are we talking about asynchronous loading?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Igor Vorotnev, 2020-05-07
@MRcracker

Script evaluation time depends on the amount of JS code that the browser needs to execute. Less code - faster execution, less blocking of the main thread. The two Jedi ways are to use less js in general, and offload the main thread (not to force the browser to do everything at once on the main thread by blocking rendering - asynchrony will help a bit here).
Useful reading:
https://developers.google.com/web/fundamentals/per...
https://developers.google.com/web/fundamentals/per...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question