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>
 
Back
Top