We've all recently fallen prey to the weblogs.asp.net changes to increase throughput on the server.

I like some of the excellent changes Scott has made to make sure the pages load as quickly as possible, and realize the necessity to remove large pieces of content such as the users list on the main page, reducing the number of recent postings on the front page, etc...

Items that are still being missed in the compression scheme:

  1. IDs on controls. Get rid of them. You'll achieve an extra few pecentage points of compression.
  2. Get rid of the Form and Viewstate that still exists on the page.
  3. Use less meaningful and thus smaller class names.
  4. Strip tabs
  5. Compactify read-more and title links

I have to say, awesome job on the CSS in general. Extremely well compacted, along with a great job doing lower case mark-up (this drastically improves compression over mixed-case mark-up). These changes really just help the main page and individual user pages, not necessarily the RSS feed. There are other options for the RSS. If there really is a huge push to make the throughput and page sizes as efficient as possible I happily offer my suggestions.

Published Thursday, October 07, 2004 9:53 PM by Justin Rogers
Filed under: ,

Comments

Friday, October 08, 2004 3:36 AM by James

# re: We've all recently fallen prey to the weblogs.asp.net changes to increase throughput on the server.

Is there an easy way to have webcontrols without IDs? When nested deep inside a number of other controls they can get very long.
Friday, October 08, 2004 2:25 PM by Justin Rogers

# re: We've all recently fallen prey to the weblogs.asp.net changes to increase throughput on the server.

Yep, customize your HtmlTextWriter to ignore that specific attribute. You'll see that in HtmlControl.RenderAttributes there is an explicit WriteAttribute for ("id", ClientID) giving you an idea of what you'll have to look for in WriteAttribute.

To be more selective you can override RenderAttributes on specific control types. HtmlAnchor is giving .Text a problem, so they could selectively create a better version that removes the id field.
Friday, October 08, 2004 2:39 PM by Scott Mitchell

# RE: We've all recently fallen prey to the weblogs.asp.net changes to increase throughput on the server.

Some of those IDs are needed because they are referenced in the CSS. But many of them (those of the 'HyperlinkX' flavor) can be scratched. The other suggestions are great, but I wonder at what point taking the time to make these small improvements outweighs the actual cost of just having them there... (i.e., the view state is, what, 100 bytes?)
Friday, October 08, 2004 2:52 PM by Justin Rogers

# re: We've all recently fallen prey to the weblogs.asp.net changes to increase throughput on the server.

That was odd, had to unmoderate that comment for some reason...

In response, there has been a huge amount of work already done to compress the page sizes down. Most explicitly in terms of real compression which results in a much smaller page size. If all of THAT work has already been done, but you are worried about compressing a 2k CSS file as well (they enabled compression for the CSS file as noted by ScottW) then I think removing 100 bytes of viewstate and 2k worth of id's would be a great improvement (especially since the main page isn't cached on the user's machine for nearly as long as the CSS file is).

1. Removing ID's is a 3 line code change.
2. Getting rid of viewstate is a 1 liner
3. Smaller class names is a couple of minute grep/replace.
4. Stripping tabs is a 5 line code change.
5. Compactifying links is another very cheap change as well.

Half a days work (maybe, probably less) and you've just cut your page sizes by another 10%? I think the existing changes that were made took far longer than this and some of them resulted in the same or smaller pay-offs. The only super win space change you get is your compression. All the rest are trade-offs (compression is a computational trade-off, but gzip is one of the fastest compression algorithms).

Leave a Comment

(required) 
(required) 
(optional)
(required)