What ways can I test how my webpages run? How do I know what开发者_运维知识库 levels of usage (cpu and memory are what matters, I'm guessing) are acceptable?
Any advice to get me started?
From a UI Standpoint, turn off javascript and see if your site works. If it doesn't, you've used too much....time to re-think your solutions.
And for the obligatory "that'll never happen" that will follow, yeah, there's users who still don't have JS turned on.....just like there's users who run IE6.
Steve Souders is an excellent resource for keeping up on web site optimization. I'd suggest following his High Performance Web Sites blog. Here is a recent and thorough article to review: http://www.stevesouders.com/blog/2010/05/07/wpo-web-performance-optimization
Steve mentions Speed Tracer and dynaTrace Ajax Edition to test page performance.
Alternatively, you can record load times with Firefox Firebug plugin and/or Webkit's Developer Tools (Chrome, Safari, etc). Finally, YSlow is an amazing Firefox Firebug Plugin from Yahoo.
Yahoo's YSlow is great for analyzing your pages and suggesting fixes to increase speed. Yahoo has also published some wonderful guidelines for making your pages fast: Best Practices for Speeding Up Your Web Site
Javascript is fast becoming a lighting fast language in all of the latest browsers, I've never had any problems. Even with endless setTimeout's at a 50ms interval you won't get any problems. The best test is to try it in Internet Explorer 6, if it usable there then you've no problems at all.
精彩评论