Which of these ways is better (faster, less storage)?
xyz.properties
in every file — about 30 keys/values .properties
file with all the data in it — about 30,000 keys/values 打开和关闭1000个文件是操作系统的主要开销,因此,最好使用一个大文件。
I think there are two aspects here:
I just gave you some questions to think about; so you might want to step back to give more requirements from your end.
In any way; you might want to look into a solution where developers deal with the many small property file (you know, like one file per functionality). And then you use tooling to build that one large file used in the production environment.
Finally: if your application really needs 30K properties; then you should very much more worry about the quality of your product. In my eyes, this isn't a design "smell"; it sounds like a design fetidness. Meaning: no reasonably application should require 30K properties to function on.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.