On Mon, Jan 4, 2016 at 11:37 PM, Joshua Cranmer 🐧 <pidgeo...@gmail.com> wrote:
> On 1/4/2016 9:24 AM, 罗勇刚(Yonggang Luo) wrote: > >> 1、I was not trying implement new things in xpcom, our company(Kingsoft) >> are >> maintaining a fork of thunderbird, and at the current time >> We have to re-use existing XPCOM components that already exists in the >> thunderbid gecko world, beyond pure html >> things, there is too much things we have to re-use(xpcom things), and we >> are facing performance problems, >> the mork-db and the mime-parse, they are all working in synchronous way, >> so >> I have to figure out a way to calling these components >> in a worker directly, so that they would not cause UI-lag in main-thread. >> That's all the reason why I was trying to re-implement XPConnect with >> js-ctypes. So that I can calling >> the exist components in the worker. And free the main-thread. >> > > Mork, by design, can't be used off main-thread. So even if you're trying > to subvert it by using JS-ctypes and etc., it's not going to work very > well, let alone the problems you have with trying to maintain a > pseudo-reimplementation of xpconnect. > >> 3、 There is an advantage of XPCOM, WebIDL seems merely for Javascript, but >> XPCOM seems more language-neutral, we could be able to >> use xpcom in Java/Python and other languages, that's looks like a >> advantage >> of XPCOM. >> > XPIDL is effectively a fork of an old version of IDL. Its interfaces are > incapable of cleanly representing union types or array types very well, > something that WebIDL does far better, as WebIDL is partly a fork of a > newer version of IDL. I believe there already exists WebIDL bindings for > C++, JS, and Rust, and extending it to Java or Python would not be a > challenging task. The only complexity is that the WebIDL bindings does not > use a grand-central dispatch mechanism like XPConnect, but that merely > means that adding new bindings requires writing a code generator and > feeding all the interfaces through it instead of implementing several > customized dispatch mechanisms. Not that PyXPCOM or JavaXPCOM have worked > for the past several years. The core issue is WebIDL is not usable in non-gecko code yet, I didn't see any example in thunderbird source tree, but I see lots of XPCOM codes. So I do not have any clue how to using WebIDL in thunderbird world > > > -- > Joshua Cranmer > Thunderbird and DXR developer > Source code archæologist > > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform > -- 此致 礼 罗勇刚 Yours sincerely, Yonggang Luo _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform