- Download and use the Windows Performance Toolkit (free download). You can use it with any application on Windows.
- Six key principles:
- Quickly respond to network requests
- Minimize bytes downloaded
- Efficiently structure markup
- Optimize media usage
- Know what your application is doing
- On a dual-core system, an indicator that says you’re using 50% of CPU means you’re using 100% of a single CPU, since the web is inherently single-threaded.
- “time to glass” = perceived perception: the time it takes from a user’s action request, to the time that request’s results are visible on-screen.
- Decrease CPU time, by increasing parallelism.
<video>, always use an image preview, otherwise the browser has to download the video file so it can display the first frame.
Math.ceilingcan improve performance in long loops, because floats are slower than integers (for animation, etc.).
- The entire DOM should be less than 1,000 elements.