Performance Porblem in a constructor

Discussion in 'ASP .Net' started by nickthebish@hotmail.com, Jan 23, 2009.

  1. Guest

    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?
    , Jan 23, 2009
    #1
    1. Advertising

  2. 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>
    Michael Nemtsev [MVP], Jan 24, 2009
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gandu
    Replies:
    0
    Views:
    1,070
    Gandu
    Jan 8, 2004
  2. Raffounz

    Porblem editing makefile

    Raffounz, Sep 14, 2006, in forum: C++
    Replies:
    1
    Views:
    399
    Victor Bazarov
    Sep 14, 2006
  3. Ray
    Replies:
    2
    Views:
    697
  4. pp
    Replies:
    7
    Views:
    2,721
    John Machin
    Jan 10, 2010
  5. Nilendu
    Replies:
    1
    Views:
    95
    Bob Walton
    Nov 28, 2003
Loading...

Share This Page