Jump to content

Read File Vs Shared Variable


Poojitha Ale

Recommended Posts

Hello All,

 

Is reading a config File and storing in shared variable to access across multiple jobsa better option or simply reading the config file from each job and using the values better

Does this have any difference from performance/memory usage stand point

 

 

Thanks!

Link to comment
Share on other sites

  • 1 year later...
  • 2 months later...
Storing it in Shared Variable is definitely a better option. When you read file from each job, you have I/O and CPU impact. Unless it is a large file, in which case, it doesn't make sense to read in each job. Once it is in shared variable, it is in memory as an object and the read is much faster. However, ensure that the write to Shared variable is in a critical section group, so multiple processes do not try to update at the same time.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...