On Fri, Nov 11, 2011 at 5:16 AM, <t.bro...@gmail.com> wrote:

> I'll reiterate my question: is there any plan to move to js-ctypes? or
> is there some better alternative? or are binary components and
> recompiling every 6 weeks a necessary evil?
>
> I mean, have you looked at the problem yet? and if so what's the
> outcome? and is there a plan on your side?
>
> If you believe js-ctypes could work, but do not have time/resources to
> invest in moving to them, then maybe I could try it on my side. But if
> you already looked at it and know that js-ctypes won't work, then I
> won't invest time. And if you have a plan to do the move on your side,
> then I'll wait too.
>

>From a brief look, it seems there is no way to get a callback when an
object is no longer referenced -- this is required to free the Java object
that has been wrapped on the JS side once it is no longer referenced.  It
also wasn't clear how to create a JS object that wraps a Java object and
intercept all the methods, but I assume that part can be done in JS.

Aside from that, it looks like it is just moving parts of the problem
around.  Instead of having FF load the correct binary based on the
platform, it looks like it is up to your JS code to figure out what to load
(though the examples seem inconsistent, so maybe it isn't that bad).  All
the calls from the plugin to the JS engine will have to be proxied through
the JS code (for example, I didn't see how to allocate a JS string), which
will mean a lot of boilerplate and a likely performance impact.

So, assuming the finalizer problem can be overcome, I think it would be
possible but would be a lot of work to get worse performance.

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to