On Sat, Nov 28, 2009 at 08:21, asianCoolz <[email protected]> wrote:
> anyone tried using PB on GWT?  from my research i came across saying
> performance issues with PB
> http://tinyurl.com/yem57ud

Yea, that guy isn't doing protobufs in a browser friendly way.

The best way to do protobufs in the browser is to actually generate a
JSON overlay type for each message, and use JSNI to access the message
fields directly from the JSON object, so that the entire "parse and
decode" phase is nothing more than eval() and an unchecked cast to the
overlay type.  IIRC from the Google Wave I/O video, this is how Google
Wave's UI works, using a compiler which unfortunately hasn't been
released.

I'm starting to think about this myself.  I'd love to rewrite all of
my application's RPCs to use protobufs (using this JSON overlay
strategy) to reduce the serialization costs on the client.
Unfortunately I haven't had the time to see if we can open source the
compiler Google Wave uses, or to write a new one from scratch that we
can open source.

--

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