When I profile my application , it seems that 70% of the time is spent in the method: Microsoft.Practices.EnterpriseLibrary.Configuration.Storage.ConfigurationChangeWatcher.Poller() From what I can gather this method should only be invoked every 50 seconds so I find it hard to believe that it is actually taking up that much time. Does anyone know how can I reduce the frequency that this method is called?
I'm surprised that in an application that is doing real work that a timer thread that executes once every 15 seconds (the default) and looks to just be comparing file times is taking up so much time.
What if you try to set the timer interval to a longer interval sometime after initializing Enterprise Library:
ConfigurationChangeWatcher.SetDefaultPollDelayInMilliseconds(int.MaxValue);
If you do that does the time spent decrease?
Also, if you use the FileConfigurationSource
class programmatically there is a constructor overload to disable watching for configuration file changes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With