First step in scaling a web site: HTTP caching
merbist.com
merbist.com
PROFILE before optimization. Premature optimization is a bad thing.
Most of the time is spent rendering the page. Most people come to you with an empty cache. Why is Cinema Treasures loading dozens of jQuery javascript files from a handful of different domains? Such a waste of user time. Concatenate as much as you can, and serve it off of a CDN.
See what takes a long time to render. See what pages are most popular. Save the most user-time per engineering hour you can.
> Most of the time is spent rendering the page.
No. Most of the time is spent waiting for components.Similarly after optimizing CSS images server would have to server much less traffic (and maybe fewer requests). Footer.gif and subnav.gif together take about 200KB now, but the size can be cut in half just by switching to PNG. Remaking the background with repeated images and some cicada pattern for noise should let to cut the size tenfold. Tweetie.png can be less than 2KB without losing quality — that's 15x less.
Photos are served from different domain (good), bet those small jpegs are still way too big file-size wise. I guess they are produced automatically, but it would be worth to have some additional optimization for them — that alone would allow to cut the size of each about tenfold too.
Maybe, but it's the client spending that time, not the server. It's largely a separate issue from what it is being discussed here.
Save the most user-time per engineering hour you can.
If your server can handle 100 requests a second and you know you're soon going to be receiving 1000 requests per second, it makes more sense to address that with HTTP caching than twiddle with your javascript includes. A browser can't render a page that the server is too overloaded to send.
Maybe worth a quick twiddle.
The Military uses the OODA (Observe-Orient-Decide-Act) loop. I think this is the right approach for performance issues (both latency and scalability.) Profiling, monitoring, load analysis and systems analysis all play a part in the "Observe" step.
The other reason to profile is that it gives you a baseline for comparison so you know if you are making improvements.
Really, if most pages on your site are identical for every user, sans their name + avatar at the top, it's worth figuring out a strategy to serve the page content from disk and swap in the dynamic parts easily without hitting your app layer.