In hosted mode GWT executes Java byte code while in web mode it
executes JavaScript. In general Java will execute more rapidly than
JavaScript (though more modern browsers are much faster now) so large
blocks of code that don't access the DOM or manipulate JavaScript
objects will probably run more quickly in hosted mode. However, when
you want to perform DOM manipulation hosted mode must call JavaScript
from Java which is going to be slower so lots of DOM manipulation will
run more slowly in hosted mode. Deserialization will be impacted in
the same way, the JSON returned from the server must be parsed using
eval and then converted into Java objects, which will be slower than
directly using the JavaScript objects, which is what web mode can
do.

On Jan 13, 5:28 am, "[email protected]"
<[email protected]> wrote:
> Hi,
>
> while developing our web application, I noticed some discrepancies
> between the behavior of the hosted mode and the Internet Explorer 7 on
> Windows Vista Ultimate (using GWT 1.7.1).
>
> In general, the hosted mode is slower than the web mode; ok. So be it.
>
> _But_ there is at least one scenario that I do not understand, maybe
> you can shed some light on this:
>
> I have a large tree structure, which consists of a root node and 4000
> children of this root. I query the children on the server side and
> return the children as an array of serializable XTreeNode-Objects
> (nothing too fancy, a name, an ArrayList of children, and a refrence
> to the parent XTreeNode).
> In hosted mode, serializing these elements on the server and de-
> serializing them on the client takes ~2 minutes. In Web Mode (be it in
> FF or IE), it takes virtually no time at all.
> Why is that?
>
> Incidentally, the exact opposite happens for a reason that I don't
> understand yet (and thus can't describe it): When checking for a list
> of selected elements in the tree (programmatically on the client
> side), it works fast in hosted mode, while it kills the browser in web
> mode, taking ages to complete. [I'm just mentioning this to tell you,
> that I'm really curious about the principal differences between Web
> Mode and Hosted Mode -- I am well aware that this vague description
> doesn't suffice as a problem description; I am yet on it ;)]
>
> Thanks for any insights (or pointers to articles/books)!
> Philipp
-- 
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.


Reply via email to