We have a web app + web site, which has performance issues. I have made many improvements, taking down the load time from about 10-15 to about 2 seconds (according to Yslow).
It's still too big (about 600kb for everything), but it's a huge step forward, and it would be enough... if on Safari/Mac (our client's configuration), the site wasn't taking about 2 minutes (!) to load. Our client's clients are also often on Safari/Mac, so it's a big problem (we can't just say "change your browser", for example).I did a number of tests :
- Safari Mac : more than 2 minutes to load the 1st time, more than 10 seconds to refresh
- Firefox Mac : fast enough
- Safari Windows : fast enough
- Firefox Windows : fast enough
- IE Windows : fast enough
Any idea why this particular site is taking so much time to load on this particular browser ? I have no clue on how to measure performance on Safari : is the JS too much, is the 开发者_Go百科html too big... ?
The site : http://www.syntec-recrutement.org/Thanks
This is probably a bit late but anyway, I was having a similar issue today with my ASP.NET website.
It turned out to be the size of the VIEWSTATE which was causing the problem.
I have a lot of business data that is contained in combos and tree views and by default the viewstate was on for those suckers and it was totalling over 250kb! For some reason, on a Windows 7 64-bit system this was not causing an issue (I was testing in IE9, Chrome 13, Firefox 5, Safari 5) but on Mac OS X 10.6 the page was really slow to load in all browsers I tested (Safari 5, Firefox 5, Chrome 13). Once I reduced the size of the viewstate it all worked great and client-side load times were consistently fast on both Windows and OS X.
So if anybody is having this issue I would suggest looking at your page source once the page has rendered and seeing if the viewstate is ridiculously large. If so, try reducing the size of your viewstate.
One easy way to do this (ASP.NET 2.0+) is to store the viewstate in Session State on the server (which should be fine as long as your app doesn't have heaps of users and your server has enough RAM and Session State is enabled etc.). You can easliy do this by adding the following to your page's code-behind file:
PageStatePersister _pers;
protected override PageStatePersister PageStatePersister
{
get
{
if (_pers == null)
{
_pers = new SessionPageStatePersister(this);
}
return _pers;
}
}
For more info on this technique check out http://msdn.microsoft.com/en-us/library/system.web.ui.pagestatepersister.aspx
精彩评论