1 个资源文件与多个资源文件
我有一个网站,我通过页面中的资源文件和 GetGlobalResourceObject() 手动添加西班牙语和葡萄牙语支持。
我有几种类型的用户,他们基本上都有自己的网站部分。我目前只有一个大的 Language.resx 文件(针对每种语言),其中包含所有“翻译”。
我的问题:
与每页/表单只有 1 个资源文件相比,为整个网站提供一个大型资源文件会成为性能瓶颈吗?
这些文件包含大约 800 行文本。我目前正在使用 Excel 通过 concatenate() 生成资源文件(xml),这使我此时可以轻松更新 .resx 文件。
谢谢!
I have a site that I am manually adding Spanish and Portuguese support to via resource files and GetGlobalResourceObject() in my pages.
I have several types of users that have essentially their own sections of the site. I currently only have one big Language.resx file (for each language) that holds all the "translations".
My Question:
Would having one big resource file for the entire site be a performance bottle neck vs having 1 resource file per page/form?
The files contain about 800 lines of text. I am currently using excel to generate the resource files (xml) via concatenate(), which makes it easy for me to update the .resx files at this point.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
拥有多个资源文件的原因是:
性能方面 - 在正常情况下,拥有单个文件会导致更少的 IO而不是在多个文件中拥有相同的信息。然而,由于该成本仅发生一次(读取资源文件时),因此通常可以忽略不计。
The reasons for having multiple resource files are:
Performance wise - having a single file would, under normal circumstances cause less IO than having the same information across multiple files. However, since this is a cost that is only incurred once (when reading the resource files), it would normally be negligible.