Read config setting from web.config performance?

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

Marina

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

Joe Fallon

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

Members online

No members online now.

Forum statistics

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

Latest Threads

Top