Atlas Weight Issues: Take 2

I got some really great comments on my last post. Apperantly FireFox doesn't report on the wire numbers, so here are the numbers from Fiddler.

After clearing the cache, a page with a text box, ScriptManager and CalendarExtender:

Request Count:  17
Bytes Sent:  10,492
Bytes Received: 149,145

Refreshing the page (meaning we get stuff from the cache):

Request Count:  14
Bytes Sent:  9,382
Bytes Received: 31,932

That is still 31Kb that I am not sure where they are coming from. Based on the feedback from the last post, it looks like there are a few other things that need to be done.

  • Get AjaxToolKit that is compiled in release mode.
  • <compilation debug="false">
  • <

    scriptResourceHandler enableCompression="true" enableCaching="true" />

After clearing the cache, same page:

Request Count:  14
Bytes Sent:  9,282
Bytes Received: 122,254

Refresh the page (get stuff from cache):

Request Count:  14
Bytes Sent:  9,382
Bytes Received: 32,010

So, we still get 31Kb, but worse than that, we get 14 requests(!).

Same page, without CalendarExtender (no cache):

Request Count:  5
Bytes Sent:  2,806
Bytes Received: 56,702

With cache:

Request Count:  4
Bytes Sent:  2,482
Bytes Received: 23,873

The request that seems to be biggest (and apperntly uncached) is: /WebResource.axd?d=vreWgJm8KHsCnZnd2dT3Zg2&t=633067941986250000 and it contains javascript functions such as WebForm_PostBackOptions and friends.

For comparision purposes, I have removed the ScriptManager as well:

Request Count:  2
Bytes Sent:  978
Bytes Received: 2,540

And when it is cached:

Request Count:  1
Bytes Sent:  554
Bytes Received: 747

As far as I can tell, I am doing everything the way I should do it. But this also means that the issue is with the weight, but the request count. HTTP allows only 2 requests per host, and that means that in cases where just the scripts takes 14 requests, everything else that is Ajaxified will need to wait for them to complete.

The solution for me was to drop the CalendarExtender completely, I went with a simple javascript calendar, it doesn't do sliding animations and other cool stuff that the CalendarExtender does, but it doesn't kill my site when it is working, either.

Print | posted on Thursday, March 01, 2007 9:44 AM

Feedback


Gravatar

# re: Atlas Weight Issues: Take 2 3/1/2007 9:10 PM Jesse

I just recently noticed the issue with these resources, /WebResource.axd?*, not being cached on the client as well. I thought this was maybe because I was running in debug mode or on the cassini web server. I'm going to go test this on IIS and not in debug mode. This is really alarming since I moved the scripts in most of my server controls to be web resources. Hopefully ScottGu can comment on that as well.


Gravatar

# Link Listing - March 1, 2007 3/2/2007 6:02 AM Christopher Steen

Atlas Weight Issues: Take 2 [Via: Ayende Rahien ] Virtual PC Tips and Hardware Assisted Virtualization...


Gravatar

# re: Atlas Weight Issues: Take 2 3/6/2007 12:45 AM Jesse

Confirmed that debug is the culprit for web resources not being cached.


Gravatar

# re: Atlas Weight Issues: Take 2 3/6/2007 2:46 AM Ayende Rahien

@Jesse,
I got a test case where even in release mode, the web resource are not being cached.
I am talking about the resources for ASP.Net callback functionality here.

Comments have been closed on this topic.