I wrote a static Parameters class for my project so all objects in the project would have easy access to the parameters. This worked fine until now, because I want to experiment with different parameters.
I'd prefer not to instantiate the Parameter object and give it as a parameter to each object I create (because I have to change a lot of code).
So my idea was to give the Parameters class static functions to read from a file. However, during an iteration of the program, up to a million calls could me made to the Parameters classs. Now my question is: would this hurt the performance of my system?
I'm hoping that the static class reads the file once and if it's not deleted by the garbage collector, the second time it is called it can directly return a requested value.
Thanks in advance!