|
|
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Remove unused languages
Remove unused languages [message #41624] |
Mon, 06 January 2014 12:00 |
crydev
Messages: 151 Registered: October 2012 Location: Netherlands
|
Experienced Member |
|
|
Hello,
When I browse through my executable in the disassembler I see a lot of unused languages being compiled into the application. English is sufficient for me, Dutch, Polish, Swedish, etc. are not necessary and in my situation only waste space in the application.
Is there a way to disable or remove them in a way that they are not linked anymore?
Regards,
crydev
|
|
|
|
Re: Remove unused languages [message #41628 is a reply to message #41624] |
Mon, 06 January 2014 16:20 |
crydev
Messages: 151 Registered: October 2012 Location: Netherlands
|
Experienced Member |
|
|
I did some basic calculations, based on the information I found in the disassembler and what I found in files: Core.t and LangInfo.cpp.
The image below shows a few example strings. They are located in Core.t and I assume they are translations for an error or information message in multiple languages. However, in the disassembler you can see that they are all compiled into the executable. I did not measure this, but an educated guess on Core.t, which is 44 kb (~ 40 kb with margins of non-trivial information) is linked into the executable. If just the english translations are linked into the executable, the size could be reduced by roughly: average string length divided by the number of languages built into U++.
The image below shows the language array in LangInfo.cpp. The big rectangle shows the strings that are linked, which are a hell of a lot and they shouldn't be necessary.
The small rectangle shows the fact that some strings even indicate only very small differences. The compilation loaded into IDA Pro is built in VC10 Optimal with String Pooling enabled. Even if these strings could not be eliminated, it would be nice if they could be concatenated in order to remove the redundancy that is generated.
If you need any more information, please tell me.
Regards,
crydev
|
|
|
|
|
Re: Remove unused languages [message #41642 is a reply to message #41640] |
Tue, 07 January 2014 09:29 |
|
mirek
Messages: 14162 Registered: November 2005
|
Ultimate Member |
|
|
crydev wrote on Mon, 06 January 2014 17:24 |
mirek wrote on Mon, 06 January 2014 17:45 | OK, IMO it makes sense to at least add RM issue about this. Alternatively, we could consider also consider compression (zlib) - but that might be hard(er) to achieve.
|
That would be very nice. I have been trying to get my hands on the whereabouts of zlib in U++ GUI applications and why it is being used. I am not sure but I think it has something to do with the iml compression? If so, it has to be researched / tested whether removing zlib actually results in a decrease of image size when images are not compressed anymore and in situations of how many images you should have in order to gain size improvements.
Could you enlighten the purpose of zlib in U++ GUI applications a bit more?
|
Well, zlib is quite universally used about everywhere fast moderate compression is required. I do not think I will recall all of them, but
.imls are indeed compressed
.brc files can be compressed as well
.tpp files are compressed
HttpRequest has to use zlib to decompress responses
plugin/png is using zlib; png is format of choice for X11 clipboard
Some of RichObject formats use zlib compression
RichEdit spellchecker is using zlib compression
....
Mirek
[Updated on: Tue, 07 January 2014 10:07] Report message to a moderator
|
|
|
Re: Remove unused languages [message #57885 is a reply to message #41642] |
Mon, 27 December 2021 02:44 |
Lance
Messages: 633 Registered: March 2007
|
Contributor |
|
|
A extremely simply solution to this particular problem is find all *.t that's used by the program, either comment out each of them, or if you don't see any chance you will use them in the future, just delete the content (but not any of the *.t files) of each of them. This works for English only. The saving is not very significant.
|
|
|
Goto Forum:
Current Time: Fri Dec 13 23:30:49 CET 2024
Total time taken to generate the page: 0.03441 seconds
|
|
|