I have done the experiment you said.
I write the code in JavaScript like that:
for (var i = 0; i < 2000; i++)
{
document.createElement("div");
}
The time to execute that is about 20ms in all IE.
I have examined the code GWT compiler generated (with PRETTY
parameter), and find the code is similar with the code I write above.
On 2月4日, 下午9时23分, Lothar Kimmeringer <[email protected]> wrote:
> kernel schrieb:
>
> > For example, when I I'm using IE7 on Windows XP Pro SP3, the following
> > code will run about 4000ms.
>
> > for (int i = 0; i < 2000; i++)
> > {
> > Document.get().createDivElement();
> > }
>
> > But when I use FireFox 3, Chrome or just some IE6 on Windows XP, the
> > code will run just about 20ms.
>
> > How can I solve the problem?
>
> Find out if the browser is simply not capable of doing this faster
> by implementing an plain HTML-page containing Javascript-code doing
> above. If the time to execute that is the same as with GWT, there
> will be no solution, except changing the browser, think about simply
> avoiding the creation of parts that aren't used, etc.
>
> Regards, Lothar
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---