I have a number of appSettings in web.config that are used frequently (i.e. on each post back). Does the ConfigurationManager hold these values in process or are there any performance gains to be had by copying these values into application state on ApplicationStart() and subsequently retrieving them from there?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
AFAIK the configuration is read and parsed at startup and the data is held in memory thereafter. I don’t believe any performance gains from caching the state in application variables will be significant – though you may get improved readability as you don’t litter the code with