Read config setting from web.config performance?

  • Thread starter Thread starter Hardy Wang
  • Start date Start date
H

Hardy Wang

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.
 
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.
 
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.
 

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