> As far as we can see, in the one-time use,  unnecessary declaration lines
> are executed and slows down the execution.
>
> We have done some testing and can see that execution of:
>
> var xx = "test string";
>
> widget.setToolTipText(this.tr(xx));
>
> takes longer time than
>
> widget.setToolTipText(this.tr("test string"));

This really depends on the browser/OS your testing on. E.g. AFAIK this is
not true in IE, at least not in the older versions, where this
optimization is crucial. If you target non-IE browsers with your app, you
may want to disable the "strings" optimization in your config.

Also, your notion of "one-time use" is ambiguous. Do you mean *lexical*
use?! A string might be appear only once in the code, but the reference is
in a loop, or within a function that is called often. So a single
appearance in code can mean a lot of uses at run time. This is hardly
foreseeable by the optimizer.

> 2. We have also noticed that you put the names of the local variables
> holding the strings mentioned above to the same, i.e. they are not for the
> application globally named. Is there a specific reason for that, more than
> you might want to keep modularisation, which we believe is not relevant
> here as the code can not be pruned and grafted with other pieces of code
> after generating it.

For one thing, I wouldn't expect much space saving if the string vars were
global. But on the other hand I'm very happy for every optimization that
can be applied to a class independently of all the others, as independent
handling of class code becomes more and more important.

> 3. We have previously added an enhancement bug text about the translation
> strings and converting the .po files in the .js files. Now the key of the
> translation string is multiplied in all language .js files and in the
> execution code file too. This could be collapsed if global keys were used
> instead of the long original key strings. The global key should be
> "dynamic" in size 1, 2 or 3-byte long.

This one is interesting, but I'm not aware of any targeting for this bug.

T.


------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to