Today, with broadband widely available, subsecond download times are eminently possible and should definitely be the goal.
— Jakob Nielsen
Perf Score gives you a detailed view into how fast your page loads.
It also provides a letter grade (A to F) indicating how fast it appears to your users.
To display your perf score at the bottom of every page, set
showPerfScore: true in
[? error2 ?]
- Aim for load times under 1 second. Research shows that users perceive an interface to be slow after 1 second. (Read more)
- The best score is an A+ (under 250ms).
- Any page load over 2 seconds should probably be optimized.
How to Improve Performance
We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.
— Donald Knuth
- Do not micro-optimize. Don’t worry about the difference between small things, like
a += 1vs.
a = a + 1. This leads to hard-to-maintain code and rarely makes a noticeable difference. It doesn’t matter if an operation is X% faster if the difference is only in nanoseconds.
- Instead, find the bottlenecks. This is the “hot path” — a single block of code that takes the biggest chunk of time. The Perf Score panel will show you which tasks are taking the longest. You can add new tasks to the list using the
- The most common bottleneck is a database query. The quickest solution is usually to cache the query results.
- Take an honest look at whether including 3rd party social and analytics widgets is worth the extra bloat. Same with large images. Try to remove anything that isn’t truly necessary. This is more important than ever, now that the majority of browsing happens on mobile devices.
- If it ain’t broke, don’t fix it. It’s tempting to constantly tweak performance. But if you’re already getting sub-second load times, you can probably move on to other tasks.