Ok, this is maybe a misunderstanding. String are values which are 
encapsulated with quotes. The only thing why we do this is to optimize 
the execution performance of IE. It's not better regarding of cosmetics. 
The case you mention are not strings, that elements are identifiers. 
It's much faster to access hash maps with an identifier than with a 
string like you suggest.

The only case which is useful in my opinion is our addition to the SVN. 
The effect is not detectable because the whole code use many constants. 
But constants for ugly things like dots, commas, etc. will be removed 
earlier or later, which makes the code looking nicer, but also executing 
slower. Then the optimizer will really improve the execution speed of 
the affected files.

Hope this helps.

Cheers,

Sebastian



dperez schrieb:
> Hi,
> 
> Another case for string compressing, that could be more useful (it needs to
> be measured in practice):
> 
>    var dc = new qx.ui.component.DateChooser();
> 
> could be converted to:
> 
>    var dc = new qx[$[22]][$[50]][$[52]]();
> 
> or just do this for strings whose length greater than a given value, e.g. 5:
> 
>    var dc = new qx.ui.[$[50]][$[52]]();
> 
> where $[52] = 'DateChooser'
> 
> this kind of strings are repeated everywhere, unlike constant strings.
> 
> 
> Sebastian Werner wrote:
>> No it removes all string instances and replace them with a global array 
>> access:
>>
>> var foo = "hello" + " " + "world";
>>
>> will be automatically converted to something like:
>>
>> var foo = $[22] + $[12] + $[504];
>>
>> This increases the performance of IE6 and maybe even IE7. But as there 
>> are already many constants the effect is quite minimal currently.
>>
>> Cheers,
>>
>> Sebastian
>>
>>
>>
>> dperez schrieb:
>>> Hi,
>>>
>>> I don't fully understand the idea.
>>> Could you please post a small example of how it works, and the code would
>>> be
>>> transformed?
>>> It is a constant expansion? (i.e.:   qx.constant.Event.APPEAR --->
>>> 'appear'
>>> ).
>>> I suppose it has nothing to do with changing local variable names to
>>> shorter
>>> ones.
>>>
>>>
>>> Sebastian Werner wrote:
>>>> Hi everybody,
>>>>
>>>> I've just updated the SVN to enable the new string compression module 
>>>> everywhere. I've also updated the demo pages and the API viewer online. 
>>>> The demo and API viewer seems to work quite well. But it's possible that 
>>>> these changes break your applications. Please test this new stuff. Any 
>>>> feedback is really welcome. Please report every problem you have.
>>>>
>>>> The idea behind:
>>>> Lay out all string instances to a global array which is accessible from 
>>>> everywhere. Will dramatically (auto-)optimize IE performance in typical 
>>>> string operations (concat, case statements, events, ...). Because there 
>>>> are currently many constants in the qooxdoo code the effect is quite 
>>>> small (I'm not sure if detectable at all ;)). But I think this is a good 
>>>> way for our future development. This allows us to just use strings 
>>>> instead of lay out every string we use into a constant. Makes life 
>>>> easier especially for string like ".", "=", etc. ;) We will remove them 
>>>> after a while and let the optimizer (compressor) do this work. The charm 
>>>> is that this is completely automatic. You can enable it with 
>>>> "--compress-strings" for your own projects.
>>>>
>>>> Notes:
>>>> This haven't been tested yet with the idea of many small qooxdoo modules 
>>>> which will be combined in the application. It will currently only work 
>>>> in one file environments.
>>>>
>>>> Hope you like it.
>>>>
>>>> Cheers,
>>>>
>>>> Sebastian
>>>>
>>>> -------------------------------------------------------------------------
>>>> Using Tomcat but need to do more? Need to support web services,
>>>> security?
>>>> Get stuff done quickly with pre-integrated technology to make your job
>>>> easier
>>>> Download IBM WebSphere Application Server v.1.0.1 based on Apache
>>>> Geronimo
>>>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>>>> _______________________________________________
>>>> qooxdoo-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>
>>>>
>>
>> -------------------------------------------------------------------------
>> Using Tomcat but need to do more? Need to support web services, security?
>> Get stuff done quickly with pre-integrated technology to make your job
>> easier
>> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
>> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>>
> 


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to