How to improve resource file performance?

  • Thread starter Thread starter JustMe
  • Start date Start date
J

JustMe

Hi ...

I have localized my application using resource files. Now that I am
using resources.getString() to obtain the localized versions of all
strings in my application, I'm finding that my application takes
almost twice as long to load some forms.

I suppose this makes sense, but I wonder if there are any suggestions
on how I can improve the speed?

Any and all comments are greatly appreciated.

--Terry
 
hoho...
it's why my application is so slow at startup!

yep, I've noticed they followed the guid for bad design guidelines regarding
resources.
typically each resource access throw an exception (which they catch)... I
wonder if it's not better to ship the resource as plain file outside the
assembly .. that might be the reason of the problem.... unfortunately the
designer don't let you do that with form's resources ...
 
Hi Lloyd ...

Thanks for your reply. How would one go about 'shipping the resources
a plain file'?

Also, does anyone know of any way to 'compile' special localized
versions of an application? In other words, instead of using the
resource files to determine local based on the devices settings,
create special localized EXE files .. individual exe's for french,
spanish, english, etc...? The ONLY advantage of doing this would be
the performance gain from what I can see, but it might be worth it.

In other words, if you had the following line of code:

messagebox.show(resources.getstring("Hello"))

Is there any way to actually 'compile' the app such that at runtime it
does:

messagebox.show("Hello") 'English

or

messagebox.show("Hola") 'Spanish

Not doing the actual resource lookup at runtime would make performance
as good as it was before trying to localize the app.

Does this make sense?

Thanks again,
--Terry
 
Terry, are you running Service Pack 2 on your device? Resource access was
sped up significantly between the first release of .NetCF and SP2.
Brian
--------------------
From: (e-mail address removed) (JustMe)
Newsgroups: microsoft.public.dotnet.framework.compactframework
Subject: How to improve resource file performance?
Date: 27 Jun 2004 16:58:51 -0700

Hi ...

I have localized my application using resource files. Now that I am
using resources.getString() to obtain the localized versions of all
strings in my application, I'm finding that my application takes
almost twice as long to load some forms.

I suppose this makes sense, but I wonder if there are any suggestions
on how I can improve the speed?

Any and all comments are greatly appreciated.

--Terry

This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top