On Oct 29, 6:29 am, lkcl <[EMAIL PROTECTED]> wrote:
> rummikub has 110 images loaded onto the page.  firefox takes about 5-8
> seconds to add all the tokens, one-by-one with javascript (compiled
> from python of course). pyjamas-desktop, usingwebkit, takes about 2
> seconds.  the javascript is gone in pyjamas-desktop; it's a glib /
> gobject binding direct to the c++ function which adds the image to the
> DOM model, direct.

If you use GWT ImmutableResourceBundles/ClientBundles, you get the
same benefits, without the hassle, and GWT will combine multiple
images into a single image, and turn it into a data URL, eliminating
File/Network I/O, and requiring the image to be loaded and decoded
once from a data: URL.

I personally think what's being proposed sounds a little backwards to
me. It's overly complex and error prone relying too much on native
interfacing (are you telling me it's impossible to memory leak or
cause a segfault with pyjamas?). If you're going to use the browser
for rendering anyway, you may as well let the DOM get manipulated by
Javascript, which is currently quite fast in SquirrelFish, Firefox 3,
and Opera. Really, all you're doing is using an IDL call of
element.appendChild(foo) instead asking WebKit to eval
"element.appendChild(foo)"

What you really want is access to native platform features, and to run
numerically intensive code in Java, that is, you want the ability to
call Java methods from Javascript. This is what I implemented in
Syndroid (http://timepedia.blogspot.com/2008/01/project-
syndroidsynthesis-of-gwt-and.html) for Android. This is a GWT
generator/linker library that allows calls between Java/Javascript. I
demonstrated at Google I/O, the capability of developing a GWT app
that can access native Android APIs painlessly.  What's more, my own
GWT product, Chronoscope, compiles to Android natively (no Javascript)
and runs 100% in Dalvik.

There is alot of functionality that can be delivered without getting
into the overly complex and error approach of trying to expose all the
guts and internals of WebKit as JNI functions. The speedup benefit of
running the UI modification thread inside of WebKit as JS, but running
the business logic in Java, vs running everything in Java simply
doesn't justify the downsides IMHO.

-Ray

p.s. my Syndroid presentation is here, at roughly 32 minutes in:
http://www.youtube.com/watch?v=2ScPbu8ga1Q


--~--~---------~--~----~------------~-------~--~----~
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