I've got a website that runs a lot of ajax. Unfortunately, it runs very slowly. I'm guessing it will continuously get slower as my traffic increases. Besides consolidating my code to run faster, what other things should I do to increase the speed of my website? One issue I am aware of is that the site is on a shared server - (I understand this can make a difference to site speed, but how much difference? Would it be worthwhile to get a dedicated server? And, if yes then what hosting service will give me the most speed at an affordable price?)
First things first, profile your application to figure out where the bottlenecks are. Then you can determine what needs to be done - more than likely you'll need to implement caching (full page and/or fragment caching for your AJAX requests). Trading up to a VPS or dedicated server will give you more resource allocation and control over your web server configuration than a shared hosting account, but I strongly advise taking a methodical approach to solving your issues.
It depends on how big is your site. If it's a big site that has a lot of MySQL process, you would need to host on a VPS or dedicated server and optimizing MySQL. Most providers are doing heavy oversell on shared hosting servers, so your site will load very slow on these oversold servers. You may also need to check and optimize your code, so it can load the site faster.
You may want to install the FireBug extension for Firefox, and the ySlow addon to it and check out your site using that.
Thanks all. I think I do need to get a dedicated server but it's pretty expensive. Has anyone had good experiences with a hosting company with fast servers? Thanks Zacharooni, the ySlow addon is pretty cool.