Node TCP connect to Localhost TCP server very slow

5 views
Skip to first unread message

jorandi...@gmail.com

unread,
Dec 17, 2013, 2:58:13 AM12/17/13
to node-...@googlegroups.com
I have a <script></script> within the "main" index.html file which opens a TCP connection to a server on localhost.

I am then using the Dev console to write to this socket to measure RTT on localhost.

It's very slow, around 400ms compared to a standalone Node script which is around 1ms.

Is there anything I could be doing wrong? Is this a side-effect of running the Node code within the window and dev tools context?

Would "node-main" be faster? Would I still be able to call functions in it using the dev tools?

Roger

unread,
Dec 17, 2013, 3:24:58 AM12/17/13
to jorandi...@gmail.com, node-...@googlegroups.com
It should be fast. On which OS did you see this?
--
Roger

jorandi...@gmail.com

unread,
Dec 17, 2013, 4:01:51 AM12/17/13
to node-...@googlegroups.com, jorandi...@gmail.com
It's on Mac OS X

akademik nedelchev

unread,
Dec 17, 2013, 5:09:00 AM12/17/13
to node-...@googlegroups.com
you are connecting to "localhost" or to 127.0.0.1 ? 


2013/12/17 <jorandi...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "node-webkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-webkit...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Joran Greef

unread,
Dec 17, 2013, 5:57:14 AM12/17/13
to node-...@googlegroups.com
Connecting to "|ocalhost".

Roger

unread,
Dec 17, 2013, 5:59:33 AM12/17/13
to jorandi...@gmail.com, node-...@googlegroups.com
<jorandi...@gmail.com> writes:

> It's on Mac OS X

Does the same code work well for you on Linux or windows?

--
Roger

voidv...@gmail.com

unread,
Dec 17, 2013, 6:46:05 AM12/17/13
to node-...@googlegroups.com
Under windows i found the same problem: 500ms lag. When I turn off Nod32 - 1-2ms ping.

akademik nedelchev

unread,
Dec 17, 2013, 7:09:18 AM12/17/13
to node-...@googlegroups.com
try 127.0.0.1 instead


2013/12/17 <voidv...@gmail.com>
Under windows i found the same problem: 500ms lag. When I turn off Nod32 - 1-2ms ping.

--

jorandi...@gmail.com

unread,
Dec 17, 2013, 9:48:49 AM12/17/13
to node-...@googlegroups.com
Thanks, but 127.0.0.1 is no different, still the same lag.

Joran Greef

unread,
Dec 17, 2013, 9:54:08 AM12/17/13
to node-...@googlegroups.com
Roger, I don't have access to test on Linux or Windows.

Roger

unread,
Dec 17, 2013, 10:33:58 AM12/17/13
to Joran Greef, node-...@googlegroups.com
Joran Greef <jo...@ronomon.com> writes:

> Roger, I don't have access to test on Linux or Windows.

Never mind. It looks like a known bug. I'll try it here.
--
Roger

jorandi...@gmail.com

unread,
Jan 1, 2014, 9:38:15 AM1/1/14
to node-...@googlegroups.com, Joran Greef
Thanks Roger, looks like it is fixed in the latest release.
Reply all
Reply to author
Forward
0 new messages