oops, my bad, you are talking about the grid example ...

This is overly simplified, but ...

Well lets look at what is happening. every time you create a widget,  
you instantiate a javascript object, that object has fields and  
methods to support widget behavior, so more javascript object  
instantiation, you also call Document.createElement() to create the  
element that will ultimately be inserted into the DOM ... now you do  
this multiple times because composite widgets are rarely just a single  
widget. All of this stuff is done in an interpreted dynamic language ...

Now, getInnerHtml() -> setInnerHTML() no objects are created in  
javascript, (well, ok one string is created by the getInnerHTML call)  
a single DOM method call is made that passes text to the underlying  
browser rendering engine (usually compiled C of some sort) that engine  
renders the html and you are done.

Though there have been great strides in Javascript engine performance  
in the last year, they still are nowhere near the performance of  
compiled C code.

-jason


On Apr 16, 2009, at 10:55 AM, Vitali Lovich wrote:

> How is this different than building up the HTML structure using
> widgets as I mention above?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to