C# – Are there any performance issues or caveats with resource (.resx) files

asp.netcresource-filesresourcesresx

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?

Best Answer

 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.

Related Topic