Hi everyone,
I will be supporting 5 languages in my app.
And I'm not sure if my memory usage will increase a lot if I put all the image resources inside the resource file.
Currently the images are 25MB / language
My memory usage is 600MB currently.
Will it consume more memory when i put in all resources in the resource file?
Thanks in advance.
-dantz
16 2664 tlhintoq 3,525
Recognized Expert Specialist
Your *memory* usage is 600mb? That's more than Adobe Photoshop.
What the frak is the application for?
A 2gig machine with 1.3 for the O.S. will barely be able to run it.
You could do language specific resource files so that when your installer runs for that language then you get just those resources.
If you built a form in one language (default/English), then changed the language in designer (say to German), then imported your graphics, it should have happened automatically. I've only done a couple applications like this (English, Spanish) but it was pretty painless once I got the 'feel' of it.
The memory is roughly around this size 400-600mb...
It is a game manager that handles flash games
Inside the game manager got 10 picturbox that have timer to do animation by changing images. 1 of the picturebox change images every 50ms interval of the timer, while others are using 100ms interval.
For changing of language, the trigger will be during run-time.
I have something like a system menu where the user can choose 2 language between the 5 available languages. Then when he finish choosing the languages it will be reflected on the main form where there is a button to change between the 2 language.
How am I suppose to support these kind of feature without increasing my memory usage?
Another question is it possible to make the supporting without changing the code?/ I mean if i add one more language from the present 5 is it possible to do it by not changing any source code?
TIA
-dantz
i made a application like that, i used XML's with text in different languages, but i dont understand, you are using images instead of text and want to.. "translate" text in images? if thats the way then as tlhintoq said just make different resource files with images in different languages and then use the resource file according to language (the same way i did with XML's -- was easy)
tlhintoq 3,525
Recognized Expert Specialist
Vishal: Nobody said anything about translating text to images, except you.
Datz: You could change the design from having everything in memory/resources to having your images in directories within the application directory. Then change languages based on what directories exist. To add a language you just add a subdirectory with your images and maybe a file of all the text used in messages.
but i dont understand, you are using images instead of text and want to.. "translate" text in images?
i said that, i didnt *understand* what he exactly wanted to do.. it was a guess sheesh..
Frinavale 9,735
Recognized Expert Moderator Expert
What I don't understand is why having multiple resources for different languages is going to affect your memory anyways??
When you're using an application you just want it to be displayed in the language/culture that you are comfortable with. You don't really care about the other languages/cultures.
Resource files make this possible. Only the resources required for the application in the user's language/culture is used (unless the resource can't be found in that language/culture in which case it falls back to the default language/cultural resource). It doesn't make sense to load 5 resource files when the user is only interested in viewing the application in their language/culture.
The resource files may take up space on the hard drive but I wouldn't have thought that they effect memory...?
If you're unfamiliar with resources in .NET check out Resources in Applications, Resources in .resx file format, Creating Resource Files, Packaging and deploying resources, and Satellite Assemblies...
-Frinny
tlhintoq 3,525
Recognized Expert Specialist
For changing of language, the trigger will be during run-time.
I have something like a system menu where the user can choose 2 language between the 5 available languages.
To me I think the OP is creating a language training game. Pick English and Spanish to learn a new language. Pick Gernan and French. Etc. Which would explain why he has to load so much data and not just a single language installation.
Dantz: Am I guessing correctly?
Thanks for all the replies
To me I think the OP is creating a language training game. Pick English and Spanish to learn a new language. Pick Gernan and French. Etc. Which would explain why he has to load so much data and not just a single language installation.
tlhintoq: Nope it is not a training game. The reason for supporting 2 language is to let users choose which language they are comfortable with.
(I am just actually following a user requirement. If I will be deciding on the language I will just use the local language where my application will be shipped)
...but i dont understand, you are using images instead of text
vishal1082: I am using images because the display for Chinese and Japanese text doesn't look nice..That was my solution to deal with those double byte characters because the UI must look really nice (~even though i know resources file size will suffer)
What I don't understand is why having multiple resources for different languages is going to affect your memory anyways??
Frinavale: I am just guessing. Because right now my application is already having a big memory consumption. So I am not sure if this is a cause of the way I am using images through timer or because of all the objects that are persistent since my app loaded. As of now if I redesign my application there isn't much enough time to do it, So now what I am doing is atleast trying not to extend more on that memory usage.
Datz: You could change the design from having everything in memory/resources to having your images in directories within the application directory. Then change languages based on what directories exist. To add a language you just add a subdirectory with your images and maybe a file of all the text used in messages.
tlhintoq: Thanks for this suggestion. Is the loading from file and loading from .resx have any differences? Because at start I was adding the images in an outside directory but there is one instance that when I load a form while loading its image contents from file (keyboard kind of form), I had seen some flickering before the form shows completely. Then each keys in that form are somewhat showing one by one (that somehow looks like I am animating it)
tlhintoq 3,525
Recognized Expert Specialist
tlhintoq: Nope it is not a training game. The reason for supporting 2 language is to let users choose which language they are comfortable with.
In that case the installer should offer the language choice to the user when the application is installed, just a like any other application. You don't really have multiple resource files INSTALLED and MEMORY RESIDENT when it is running.
tlhintoq 3,525
Recognized Expert Specialist
I was adding the images in an outside directory but there is one instance that when I load a form while loading its image contents from file (keyboard kind of form), I had seen some flickering before the form shows completely. Then each keys in that form are somewhat showing one by one (that somehow looks like I am animating it)
Then don't show the form until all the images have loaded. Create it, load the images, then show it.
Also, how big are your keycap images? I have a hard time imaging the loading of 102 images (standard keyboard) to be so slow that you can watch them appear one by one - provided the images are of the same size as the keys.
Also, how big are your keycap images?
Its 6kb each..having 100x100 dimension.
Hmm..maybe i need to try it one more time. There is probably some other cause why it resulted to be like that. Showing the form in modal doesn't have any effect right?
tlhintoq 3,525
Recognized Expert Specialist
Its 6kb each..having 100x100 dimension.
How big are your keys?
If your screen is 1024 wide... and you go full screen... 15 columns of keys (assuming no extras or 10-keypad) would be at most 68 pixels wide. Less if you have attractive spacing. I'd bet you only need images 50x50. Reducing the size to 1/4 of your current size may not change the total load time by much but every little bit helps.
My keyboard will always be full screen which is 1680x1050.
My key buttons are also 100x100 so no need to stretch the image layout of the button (picture box)
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: dc |
last post by:
Product Announcement:
Multi-Lingual web site using Nested Templates and Menus
http://www.decloak.com/Products/Dreamweaver/NestedTemplates/
You can see the TONGUES of FIRE demo web site at...
|
by: THY |
last post by:
anyone know a good way to create a multi-lingual website in ASP.Net ?
thanks
|
by: Steve Smith |
last post by:
I have written a winforms application that launches approximately 150
threads with
Thread.ThreadStart()
Each thread uses CDO 1.21 to logon to a different Exchange mailbox and
send/receive a...
|
by: brian.wilson4 |
last post by:
Our group is currently comparing winforms vs webforms.....app is Corp
LAN based - we have control of desktops.....Below is pros and cons list
we have come up with - if anything strikes you as...
|
by: Dylan Parry |
last post by:
Hi folks,
I was wondering if anyone here has experience of making Web applications
that are multi-lingual? The solution that I have in my head is to have
several "language" files as resources so...
| |
by: Frank Rizzo |
last post by:
Hello,
I've compiled my app for AnyCPU setting in vs2005. Then I tried the app
on both 32-bit Windows 2003 R2 and 64-bit Windows 2003 R2. The memory
usage of the application when working on...
|
by: deerchao |
last post by:
I'm developing a WinForms application. It slowly eats up memory, one
client reported that it took 200MB or more, and finnaly crashed. I
myself noticed it's common to use up 30MB memory, but if I...
|
by: Ilias Lazaridis |
last post by:
How to detect memory leaks of python programms, which run in an
environment like this:
* Suse Linux 9.3
* Apache
* mod_python
The problem occoured after some updates on the infrastructure....
|
by: Jonathan |
last post by:
Before I start creating a new asp.net website, is there a standard way of
making it multi-lingual?
For example, rather than type in body text to a page, should I rather refer
by number code to a...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |