From a performance and memory point of view, what is the best practice regarding localization properties files?
A few large files or many small files?
Use properties files or compiled property class files?
Example scenario:
I have an application with about 150 .jsp files.
Each jsp files uses between 5 and 50 keys.
The total number of keys is 1500.
Each key is translated into 25 languages.
I imagine four solutions:
1) Use a few but large properties files (e.g. files like: 'Bundle_da.properties')
have 25 properties files with 1500 keys in each.
All the 150 .jsp files includes the same properties file.
In this way, all .jsp files will include all 1500 keys of which it may only use 5 to 50 keys.
2) Use a few but large properties class files (e.g. 'public class Bundle_da extends ListResourceBundle...')
have 25 classes with 1500 keys in each.
All the 150 .jsp files includes the same class.
In this way, all .jsp files will include all 1500 keys of which it may only use 5 to 50 keys.
3) Use many but small properties files
Each .jsp files will only includes the keys needed for that specific file.
The number of properties files will be 150 x 25 = 3750
In this way, all .jsp files will only include the key that are actualy used. (i.e. 5 to 50 keys).
4) Use .jsp specific properties clases.
Each .jsp specific bundle class will only includes the keys needed for that specific .jsp file.
The number of properties clases will be 150 x 25 = 3750
In this way, all .jsp files will only include the key that are actualy used. (i.e. 5 to 50 keys).
Two questions:
From a performance perspective, which of the 4 solutions is the prefered solution?
From a memory perspective, which of the 4 solutions allocates less memory on the web server?
Thank you in advance
Allan