Are there any performance issues or caveats with resource (.resx) files?

后端 未结 8 1936
遇见更好的自我
遇见更好的自我 2020-12-15 22:16

Resource files seem great for localization of labels and messages, but are they perfect?

For example:

  1. Is there a better solution if there is a huge amo
相关标签:
8条回答
  • 2020-12-15 22:34

    We have been using resource files on a relatively large .NET Windows Forms application (over 500 various forms, approximately 20 resource strings per form) and we've had no performance issues regarding resources from .resx files. We have used Babylon.NET as a tool for managing translations (has a free version just for translators). You did not specify if your project will be web or desktop application. One functionality that resource files offers for desktop applications is the ability to also localize control positions and size which IMHO is not possible using other tools (unless you are using something like DevExpress layout control which has automatic sizing).

    0 讨论(0)
  • 2020-12-15 22:36

    I recently used a .resx file with 5 million strings (normal length, like this sentence), compiled in different DLLS about 1 GB in size. It still works fine in an Azure web project.

    The load time is unknown, maybe few seconds or so, since it always can heat up in stages, I never noticed it.

    0 讨论(0)
提交回复
热议问题