What is script execution ?
Why is it important ?
- a loading delay slowed down by the weight of the scripts to download
- a loss of interactivity regarding users' actions due to too much solicitation of the "main thread" which cannot respond
- a higher cost of interpretation, especially if the page executes a lot of code before it is needed, which delays the interactivity time frame
- a high memory consumption which can give slow and jerky effects to users
How can it be improved ?
When a page suffers from slowness due to too much script execution, it is useful to :
- remove unused scripts from the page
- remove unused code from scripts
- decrease the overall use of scripts in the page