Hi Sebastian,

yes, that actually did  help, thanks! I now can explain _why_ this is done.
We used uppercase constants here for all image/icon identifiers.
Maybe I will change to lowercase keys for these constants in the future, but
for now my question is answered perfectly.

Thanks again, keep the good work, ...topic closed (for me) ;)

/Peter


> Hi Peter,
> 
> sorry for the delay. Fabian just remembered me to explain this.
> 
> The reason for the string optimization is to optimize performance issues 
> of Internet Explorer regarding string operations (concats, compares, 
> switches, ...). When someone use constants (uppercase static keys) we 
> think that they are already used as constants and are optimized through 
> this usage already. This also reduces the size of the global map from 
> unneccessary strings (which don't need this optimization).
> 
> HTH,
> 
> Sebastian
> 
> 
> 
> Peter Schneider schrieb:
>> Hello again,
>>
>> I know what you mean, but that's not what I was wondering about. The Map keys
>> do stay the way they are (of course), only the values will be replaced. Or at
>> least the ones with a lowercase letter in the key's name.
>>
>> Maybe my example wasn't that good ;) So here's another (better?) try:
>>
>> ------- Before -------
>> qx.OO.defineClass("application.Constants",
>> {
>>   sLOGO_ICO : "myLogo.png",
>>   myArray   : ["works","fine"],
>>
>>   LOGO_ICO : "myLogo.png",
>>   WHATEVER : "myLogo.png"
>> });
>> ----------------------
>>
>>
>> ------- After --------
>> qx.OO.defineClass("application.Constants",
>> {
>>   sLOGO_ICO : $[123], // will be replaced by $[###]
>>   myArray   : [$[456],$[789]],
>>
>>   LOGO_ICO : "myLogo.png",
>>   WHATEVER : "myLogo.png"
>> });
>> ----------------------
>>
>> Maybe this helps others too to understand my query.
>>
>> Best Regards,
>>    Peter
>>
>>
>>>> Peter Schneider <p.schneider <at> tis-gmbh.de> writes:
>>>>
>>>> Hi there,
>>>>
>>>> is there a reason why Map assignments in static classes that have an
>>>> all-uppercase key are not subject to string optimization?
>>>> (...) 
>>>> I figured out, that the condition is explicitly checked in 
>>>> stringoptimizer.py,
>>>> so I was wondering what could be the reason for that...is there any?...
>>> Hi Peter,
>>> Well, I use Maps for exchanging data via Qooxdoo RPC calls. the keys for 
>>> the Map
>>> entries are upper case Strings, both in my Java backend and in the Qooxdoo
>>> frontend, so it would be bad if those keys got replaced in the frontend. :)
>>>
>>> I don't know if there is another reason but that's the only reason that 
>>> comes to
>>> my mind right now.
>>>
>>> Regards,
>>> Daniel Haferkorn
>>>
>>> [...]
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys-and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 

-- 
Dipl.-Ing. (FH) Peter Schneider | TIS GmbH | Software-Entwickler
Barloer Weg 188-190 | D-46397 Bocholt
fon: +49 2871 2722-0 | fax: +49 2871 2722-99
[EMAIL PROTECTED] | www.tis-gmbh.de

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to