oeb wrote:
And all the scripts and the database calls still have to exist, and still have to be called. The point that I was trying to make is that Ajax wont actually fix the problem. You will still need the same the same amount of sql querys
You're looking at this as if you simply replace all the normal page loads with ajax calls. That isn't the case. Like I said before, ajax can completely change the request profile for users. It's not a straight swap between normal page loads and ajax calls, making a direct comparison oversimplifies things.
To give an example, look at what happens when you change what you are wearing. First you have to view your inventory, so there's a page load which incurs a database read for your inventory. Then you click to change an article of clothing, which sends a request that incurs a database write, and then redisplays your inventory page, which incurs
another database read.
The same thing done with ajax, on the other hand, would incur the initial read and the write, but not the second read, as it's unnecessary. If you are changing more than one article of clothing, it adds up. For example to change your outfit to go scuba diving, right now it takes four database reads and three writes. If ajax was used, it would be one database read and three writes. Not to mention the fact that you wouldn't have to wait patiently for the page to update before clicking on the next article of clothing you want to wear.
This extends to many different areas of Twilight. Drinking, using skills, using computers, making stuff with your workbench, welding, etc. There's lots of places where the user submits a request only to be redirected back to the same page, with the only different information being computable from what is already known by the client. Generally, places where that happens are prime candidates for ajax use.
You are right that Ajax is not automatically a performance win, but that doesn't mean it
never is, and you can usually find a lot of places in a web application like Twilight where it helps performance.