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