Performance Porblem in a constructor

  • Thread starter Thread starter nickthebish
  • Start date Start date
N

nickthebish

I have a user control that contained a constructor that set up some
read-only collections. When the fields were moved from the constructor
to the page_load, the performance was noticeably faster. Does any one
know the reason for this?
 
Hello Suntiger,

Did you put you init into !Page.IsPostBack!?
Coz any performance difference which come into my mind is absence of default
contstuctor

---
WBR,
Michae Nemtsev [Microsoft MVP] :: blog: http://msmvps.org/blogs/laflour
:: http://twitter.com/laflour

"Tis nothing good or bad, but thinking makes it so" (c) W.Shakespeare


S> I have a user control that contained a constructor that set up some
S> read-only collections. When the fields were moved from the
S> constructor to the page_load, the performance was noticeably faster.
S> Does any one know the reason for this?
S>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top