LoadControl performance

  • Thread starter Thread starter Thor W Hammer
  • Start date Start date
T

Thor W Hammer

How is LoadControl's performance compared to adding a control directly on
the WebForm designer?

TWH
 
Thanks,

In my case I was not going to place my control (control_2) on a form but
rather inside another control_1. I found that a simple way to do this is to
pass the name of control_2 through a property on control_1. I just wonder if
this will be more (run)time consuming than creating a Panel like control
(control_1), where I place the control_2 into control_1's designer. The last
solution, I think is much more (design)time consuming.
 
Hello!

With caching and 3Ghz CPUs available, I'm sure there's very little
difference between the two methods. Obviously placing the control on a page
at designtime writes the control to the compiled source for the page, but
don't forget that the loaded template will be compiled as well (and
subsequently retrieved from the assembly cache).

I wouldn't worry at all. In fact, I don't. I've built a massive modular
framework (hierarchical compositions of controls) that are create the
controls hierarchy dynamically from a db structure at runtime and we're
getting a 25ms response with pretty complex hierarchies - 15 to 25
controls - most of them are nested).
 
Back
Top