Reputation: 811
If have I have multiple processes accessing a registry value thousands of times per second, will there be any significant performance implications of reading this registry value?
The value of the registry value will never change, it will be read only. I guess another question is that is reading the registry value a blocking operation?
The registry value is for storing database connection details, accessed by an ASP.NET applications, Win Forms applications, and WCF services.
Thanks,
Stuart
Upvotes: 2
Views: 784
Reputation: 9209
Windows registry is just a file that happens to have more protection around it than other files.
Just like any file, however, there will be a performance hit as it is accessed.
I would suggest that you read your values once, on application startup and store them in memory, passing them to your objects as required.
Upvotes: 0
Reputation: 994231
The registry is fast, really fast. But thousands of times per second? At the very least, cache the value in each application so you only have to read it once on app startup.
Upvotes: 2