Whenever a user experiences performance problems, it is because he has exceeded the capacity of one of his system resources, either bandwidth memory or processing power. Before debugging any performance issue, it's essential to understand which of these factors is responsible, and this can be determined in one of two ways. First, a profiling tool (such as the tools included with all major browsers) can be used to measure how much of each resource is being used, which should quickly make obvious which resource is being used excessively. An explanation of these tools falls outside the scope of this book, but I strongly encourage you to familiarize yourself with the tools available in your favorite browser.
For most problems, however, a profiling tool won't even be necessary, because their source can be determined by how they manifest. Bandwidth problems only occur when retrieving or sending data from your server (and in most applications, only retrieval operations...