开发者

Web Development: What page load times do you aim for?

Website Page load times on the dev machine are only a rough indicator of performance of course, and there will be many other factors when moving to production, but they're still useful 开发者_运维知识库as a yard-stick.

So, I was just wondering what page load times you aim for when you're developing?

  • I mean page load times on Dev Machine/Server
  • And, on a page that includes a realistic quantity of DB calls
  • Please also state the platform/technology you're using.

I know that there could be a big range of performance regarding the actual machines out there, I'm just looking for rough figures.

Thanks


Less than 5 sec.


If it's just on my dev machine I expect it to be basically instant. I'm talking 10s of milliseconds here. Of course, that's just to generate and deliver the HTML.

Do you mean that, or do you mean complete page load/render time (html download/parse/render, images downloading/display, css downloading/parsing/rendering, javascript download/execution, flash download/plugin startup/execution, etc)? The later is really hard to quantify because a good bit of that time will be burnt up on the client machine, in the web browser.

If you're just trying to ballpark decent download + render times with an untaxed server on the local network then I'd shoot for a few seconds... no more than 5-ish (assuming your client machine is decent).


Tricky question.

For a regular web app, you don't want you page load time to exceed 5 seconds. But let's not forget that:

  • the 20%-80% rule applies here; if it takes 1 sec to load the HTML code, total rendering/loading time is probably 5-ish seconds (like fiXedd stated).
  • on a dev server, you're often not dealing with the real deal (traffic, DB load and size - number of entries can make a huge difference)
  • you want to take into account the way users want your app to behave. 5 seconds load time may be good enough to display preferences, but your basic or killer features should take less.

So in my opinion, here's a simple method to get a rough figures for a simple web app (using for example, Spring/Tapestry):

  1. Sort the pages/actions given you app profile (which pages should be lightning fast?) and give them a rough figure for production environment
  2. Then take into account the browser loading/rendering stuff. Dividing by 5 is a good start, although you can use best practices to reduce that time.
  3. Think about your production environment (DB load, number of entries, traffic...) and take an additional margin.
  4. You've got your target load time on your production server; now it's up to you and your dev server to think about your target load time on your dev platform :-D


One of the most useful benchmarks we use for identifying server-side issues is the "internal" time taken from request-received to response-flushed by the web server itself. This means ignoring network traffic / latency and page render times.

We have some custom components (.net) that measure this time and inject it into the HTTP response header (we set a header called X-Server-Response); we can extract this data using our automated test tools, which means that we can then measure it over time (and between environments).

By measuring this time you get a pretty reliable view into the raw application performance - and if you have slow pages that take a long time to render, but the HTTP response header says it finished its work in 50ms, then you know you have network / browser issues.

Once you push your application into production, you (should) have things to like caching, static files sub-domains, js/css minification etc. - all of which can offer huge performance gains (esp. caching), but can also mask underlying application issues (like pages that make hundreds of db calls.)

All of which to say, the values we use for this time is sub 1sec.

In terms of what we offer to clients around performance, we usually use 2-3s for read-only pages, and up to 5s for transactional pages (registration, checkout, upload etc.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜