Resize images outside of the CMS
Resize and optimize images outside of the website because a web server is not designed to perform such operations. This saves bandwidth and lightens the load on the processor(s) and RAM.
Use local variables
When you call a global variable in JavaScript, the interpreter must check that:
- it exists in the current scope, in the scope above, etc.
- the variable has a value
- and more
To avoid all these checks, it is often possible to make useful variables local by transforming them into routine arguments. This process saves CPU time.