SYSK 327: The Cost of RoundedCornersExtender From AjaxControlToolkit

More and more web sites are using rounded corners on spans (labels) and panels. And since AjaxControlToolkit makes it sinfully easy to do, before I start using it extensively, I decided to do some profiling to see the cost of that extender.

 

Here is what I found:

 

1.  HMTL (download) size in bytes:

# of RoundedCornersExtender Page Size

Controls

----------------------------------------------------

0 2731

1 3581 (+850)

2 3770 (+189)

3 3959 (+189)

4 4122 (+163)

5 4299 (+177)

2. Server-side page request execution time (localhost, Toshiba M5, dual 2 Ghz, 2 Mb):

# of RoundedCornersExtender Time in ms

Controls

----------------------------------------------------

0 4.311721182

1 5.398800686 (+25%)

2 7.032737401 (+30%)

3 7.399823162 (+5%)

4 8.478870918 (+15%)

5 9.263607526 (+9%)

 

 

3. Client-side AJAX controls initialization time (yesterday’s post explained how I timed the added initialization time on the client due to using the extender controls. Click here to navigate to SYSK 326):

# of RoundedCornersExtender Client init time in ms

Controls

----------------------------------------------------

0 0

1 10 (+25%)

2 16 (+30%)

3 31 (+5%)

4 31 (+15%)

5 47 (+9%)

 

 

4. Page load time (time to last byte)

 

One can use download speed to calculate the additional page load time, or you can run tests and measure it. My testing was done using localhost, so I’m not providing any data here as it’s irrelevant.

 

 

Summary: The first instance of the control adds 850 bytes, and additional instances add approximately 180 bytes. On my laptop, the additional rendering time per instance is 9.25 ms on the client and 1 ms on the server.