Slow context bridge on osx

2 views
Skip to first unread message

Tim Caswell

unread,
Nov 6, 2012, 5:29:16 PM11/6/12
to node-...@googlegroups.com
While porting my app to use node-webkit, I've noticed a huge slowdown when calling node APIs directly from the webkit code vs calling the node apis through msgpack encoded RPC over websockets.

I understand one of the main goals of node-webkit is to make the client-server interaction faster by removing the need to serialize calls, but for some reason, it's really slow on OSX.  On linux it's plenty fast as far as I can tell with my eyes.

Roger

unread,
Nov 6, 2012, 5:53:40 PM11/6/12
to node-...@googlegroups.com
It should be #82, which was just fixed. After we release it today, you could have another try.



From: Tim Caswell <t...@creationix.com>
Sent: Wed Nov 07 06:29:16 格林尼治标准时间+0800 2012
To: node-...@googlegroups.com
Subject: [node-webkit] Slow context bridge on osx

Tim Caswell

unread,
Nov 6, 2012, 5:57:42 PM11/6/12
to node-...@googlegroups.com
Awesome, it's looking like this next release has everything I need!

Roger

unread,
Nov 6, 2012, 6:47:16 PM11/6/12
to node-...@googlegroups.com
Well, the fix for node-main is to be done in 0.3.3, which will be in next week :-)



From: Tim Caswell <t...@creationix.com>
Sent: Wed Nov 07 06:57:42 格林尼治标准时间+0800 2012
To: node-...@googlegroups.com
Subject: Re: [node-webkit] Slow context bridge on osx

Tim Caswell

unread,
Nov 7, 2012, 6:16:43 PM11/7/12
to node-...@googlegroups.com
The fix made my OSX app much faster initially, but after I added in pty.js (a fork(3) binding), it got super slow.  Every libuv event now has around 1000ms of latency.  This is using 0.3.2.

matthe...@gmail.com

unread,
Dec 8, 2012, 5:35:58 PM12/8/12
to node-...@googlegroups.com
Has there been any progress or updates on this? There has been a few releases since the last post and I'm curious if the problem was figured out and or resolved. Thanks.

Tim Caswell

unread,
Dec 8, 2012, 5:40:05 PM12/8/12
to node-...@googlegroups.com
It's been considerably better in later versions.

Roger WANG

unread,
Dec 9, 2012, 8:20:44 PM12/9/12
to node-...@googlegroups.com
Tim Caswell <t...@creationix.com> writes:

> It's been considerably better in later versions.

Yeah. It's been improved a lot in v0.3.3. You can see the progress
and discussion happened here:

https://github.com/rogerwang/node-webkit/issues/82

Background: unlike Win & Linux, on Mac the renderer process of Chromium
depends on Cocoa¹ so the mainloop of Cocoa and libuv has to be
merged. And then due to possible OSX bug of handling kqueue², which
libuv is based on OSX, we made some workaround for this.

¹ http://code.google.com/p/chromium/issues/detail?id=13890

² https://www.google.com/search?q=kqueue+osx+bug


Roger


> On Sat, Dec 8, 2012 at 4:35 PM, <matthe...@gmail.com> wrote:
>
>> Has there been any progress or updates on this? There has been a few
>> releases since the last post and I'm curious if the problem was figured out
>> and or resolved. Thanks.
>>
>>
>> On Wednesday, November 7, 2012 3:16:44 PM UTC-8, Tim Caswell wrote:
>>
>>> The fix made my OSX app much faster initially, but after I added in
>>> pty.js (a fork(3) binding), it got super slow. Every libuv event now has
>>> around 1000ms of latency. This is using 0.3.2.

--
Roger WANG Intel Open Source Technology Center
Reply all
Reply to author
Forward
0 new messages