Thursday, January 10, 2008

Developers: How to Save bytes, ASP.NET

For Software Developers: "Save Bytes", Little Thing, Big Effect....e.g.

Here default name has been used. i.e. ContentPlaceHolder1. Web server has to transfer 25 bytes for this particular name.On client side it becomes something like ctl00$ContentPlaceHolder1.... , which again become too long.

Take A Scenario: If above name has 50 occurrences in a webpage & if 1000000 users are using same page then Web server has to transfer 1000000 X 25 X 50 = 125000000 bytes.If Name "ContentPlaceHolder1" is changed to "CPHold", Web Server will transfer 1000000 X 12 X 50= 60000000 bytes, i.e. Saving of 65000000 bytes
Note: This will be one way saving. Finally saying, use short id/names, don't use default/long id/names.

No comments: