Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
382 views
in Technique[技术] by (71.8m points)

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

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 amount of resources? Like 100,000 strings in a .resx file? (Theoretically, I do not actually have this problem)
  2. Is this a good method for storing the other types of data, such as images, icons, audio files, regular files, etc.?
  3. Is it a best practice to store your .resx files in a stand-alone project for easier updates/compiling?
  4. Are there any other issues that you have run into when using .resx files?
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

 1. Is there a better solution if there is a huge amount of resources? Like 100,000 strings in a .resx file? (Theoretically, I do not actually have this problem)

I've used Alfresco as an alternative content repository on Java projects. RESX files, from a maintaince standpoint (because of encoding issues I guess) can really stink.

 2. Is this a good method for storing the other types of data, such as images, icons, audio files, regular files, etc.?

I've seen it work with images...but that's it. (not sure with other media/files)

 3. Is it a best practice to store your .resx files in a stand-alone project for easier updates/compiling?

I don't, but you can edit a resx file on a live site and then edit will go through, I believe. Certainly that's the way it works in development (except for the global resx, I think)

 4. Are there any other issues that you have run into when using .resx files?

Besides being really annoying to maintain, and the fact that visual studio doesn't provide the neatest tools for working with them...no.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...