Is it that use of property files hampers the prformance
Mrutyunjay Hanchinal
Ranch Hand
Joined: Sep 26, 2001
Posts: 50
posted
0
HI all I am planning to use property files in my application, to store the configurable values. And access the same in servlets with use of ResourceBundle API in servlets. Does this hamper my application's performance? I have the other option of having a class that stores the values. I want to know the mechanism that is used in ResourceBundle. Does this load the property file contents in to the memory or does it do a file operation Thanks Mrutyunjay
If you are reading the properties file every time you need a property, it will probably be a performance drag. If the properties never change after the application has started you can try making a cache for the properties in memory and reading from this each time rather than from the harddrive. Dave
Hi David Thanks for the reply. I want to know the mechanism that is used in ResourceBundle class. Does this read from the hard drive every time a property is requested or does it cache the key value pairs in the memory Thanks for the reply. Mrutyunjay
Terence Lewis
Greenhorn
Joined: Mar 16, 2002
Posts: 2
posted
0
Hi, In some work I've been doing I've closed my FileInputStream immediately after invoking the load method on my Properties object and found that I can still perform the getProperty operations on my key=value pairs. Wouldn't this suggest that the file is being read into some kind of underlying buffer anway? Hope this helps in some way. Terence
subject: Is it that use of property files hampers the prformance