Performance Porblem in a constructor

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?
 
M

Michael Nemtsev [MVP]

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top