Read config setting from web.config performance?

Discussion in 'ASP .Net' started by Hardy Wang, Jul 29, 2004.

  1. Hardy Wang

    Hardy Wang Guest

    Hello all,
    Do you think reading config settings from web.config (app.config) kills
    system's performance?
    I installed a DevPartner Profiler, and noticed
    ConfigurationSetting.AppSettings is a little bit costly.

    --
    WWW: http://hardywang.1accesshost.com
    ICQ: 3359839
    yours Hardy
     
    Hardy Wang, Jul 29, 2004
    #1
    1. Advertisements

  2. Hardy Wang

    Marina Guest

    If it is costly, you can just load up all your configuration variables into
    a some shared variables in a class in application_start. That way, you load
    them up once, and then they're just in memory and available.

    "Hardy Wang" <> wrote in message
    news:...
    > Hello all,
    > Do you think reading config settings from web.config (app.config)

    kills
    > system's performance?
    > I installed a DevPartner Profiler, and noticed
    > ConfigurationSetting.AppSettings is a little bit costly.
    >
    > --
    > WWW: http://hardywang.1accesshost.com
    > ICQ: 3359839
    > yours Hardy
    >
    >
     
    Marina, Jul 29, 2004
    #2
    1. Advertisements

  3. Hardy Wang

    Joe Fallon Guest

    Web.config is only read once from disk.
    Then it is stored in RAM so future "reads" should be just as fast as a
    custom class.
    --
    Joe Fallon



    "Hardy Wang" <> wrote in message
    news:...
    > Hello all,
    > Do you think reading config settings from web.config (app.config)

    kills
    > system's performance?
    > I installed a DevPartner Profiler, and noticed
    > ConfigurationSetting.AppSettings is a little bit costly.
    >
    > --
    > WWW: http://hardywang.1accesshost.com
    > ICQ: 3359839
    > yours Hardy
    >
    >
     
    Joe Fallon, Jul 31, 2004
    #3
    1. Advertisements

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. jm
    Replies:
    1
    Views:
    642
    alien2_51
    Dec 12, 2003
  2. Bob
    Replies:
    7
    Views:
    1,188
    Saravana [MVP]
    May 5, 2004
  3. Benny Ng
    Replies:
    9
    Views:
    10,952
    Benny Ng
    Oct 13, 2005
  4. CSharpner
    Replies:
    0
    Views:
    1,414
    CSharpner
    Apr 9, 2007
  5. Bob
    Replies:
    8
    Views:
    331
    Saravana [MVP]
    May 5, 2004
  6. manika02

    Web Service to read from Application Web.config

    manika02, Feb 20, 2009, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    842
    Mel Weaver
    Mar 25, 2009
  7. JL
    Replies:
    2
    Views:
    247
    Tim Chase
    Dec 14, 2013
  8. Chris Angelico
    Replies:
    4
    Views:
    319
    Tim Chase
    Dec 19, 2013
Loading...