{"action":"created","issue":{"url":"https://api.github.com/repos/zeromq/zeromq.js/issues/276","repository_url":"https://api.github.com/repos/zeromq/zeromq.js","labels_url":"https://api.github.com/repos/zeromq/zeromq.js/issues/276/labels{/name}","comments_url":"https://api.github.com/repos/zeromq/zeromq.js/issues/276/comments","events_url":"https://api.github.com/repos/zeromq/zeromq.js/issues/276/events","html_url":"https://github.com/zeromq/zeromq.js/issues/276","id":356450119,"node_id":"MDU6SXNzdWUzNTY0NTAxMTk=","number":276,"title":"extremely slow on Windows 7?","user":{"login":"ClosetMonkey","id":9686763,"node_id":"MDQ6VXNlcjk2ODY3NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/9686763?v=4","gravatar_id":"","url":"https://api.github.com/users/ClosetMonkey","html_url":"https://github.com/ClosetMonkey","followers_url":"https://api.github.com/users/ClosetMonkey/followers","following_url":"https://api.github.com/users/ClosetMonkey/following{/other_user}","gists_url":"https://api.github.com/users/ClosetMonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/ClosetMonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClosetMonkey/subscriptions","organizations_url":"https://api.github.com/users/ClosetMonkey/orgs","repos_url":"https://api.github.com/users/ClosetMonkey/repos","events_url":"https://api.github.com/users/ClosetMonkey/events{/privacy}","received_events_url":"https://api.github.com/users/ClosetMonkey/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-03T10:35:48Z","updated_at":"2018-09-03T10:56:31Z","closed_at":null,"author_association":"NONE","body":"I am currently experimenting between PHP 7.2 and NodeJS 8.11. I am using a PUSH socket on node to push to a PHP worker, then pushing back into the same node script/process. When pushing from PHP to PHP and back I am able to do 50,000 simple echos in 7.0008 seconds. However when pushing from NodeJS to PHP and back it takes 4.5240 seconds for just 1,000 echos. I don't see how this can be an PHP vs. NodeJS issue, but most likely a matter of the extensions, admittedly user error (myself...) specifically. Are there common pitfalls that I should be looking out for? My NodeJS script (too lazy to get formatting right in git editor)\r\n\r\n`    \r\n     var zmq  = require('zeromq')\r\n      , zmq_push_socket = zmq.socket('push')\r\n     , zmq_pull_socket = zmq.socket('pull');\r\n    \r\n    zmq_pull_socket.on('message', function(buf) {\r\n\t    var msg = buf.toString();\r\n\t    \r\n\t    if(msg != \"+\")\r\n\t    {\r\n\t    }\r\n\t    \r\n\t    zmq_push_socket.send(\"test\");\r\n    });\r\n\r\n    zmq_push_socket.bindSync(\"tcp://*:5570\");\r\n    zmq_pull_socket.bindSync(\"tcp://*:5571\");\r\n`\r\nThe PHP script - virtually the same\r\n\r\n`<?php\r\n\r\ninclude 'zmsg.php';\r\n\r\n$context = new ZMQContext();\r\n\r\n$zmq_push_socket = new ZMQSocket($context, ZMQ::SOCKET_PUSH);\r\n$zmq_push_socket->bind(\"tcp://*:5570\");\r\n\r\n$zmq_pull_socket = new ZMQSocket($context, ZMQ::SOCKET_PULL);\r\n$zmq_pull_socket->bind(\"tcp://*:5571\");\r\n\r\n$read = $write = array();\r\n\r\nwhile (true)\r\n{\r\n\t$poll = new ZMQPoll();\r\n\t$poll->add($zmq_pull_socket, ZMQ::POLL_IN);\r\n\r\n\t$poll->poll($read, $write);\r\n\tforeach ($read as $socket)\r\n\t{\r\n\t\t$msg = $socket->recv();\r\n\t\t\r\n\t\tif($msg != \"+\")\r\n\t\t{\r\n\t\t}\r\n\t\t\r\n\t\t$zmq_push_socket->send(\"test\");\t\t\r\n\t}\r\n}\r\n`\r\n\r\nI am on Windows 7 64 bit, libzmq version is 4.2.3, PHP ZMQ extension version is 1.1.3, node zeromq module version is 4.6.0. current system is core duo (two core @ 3.0 Ghz) with 4 gigs ram."},"comment":{"url":"https://api.github.com/repos/zeromq/zeromq.js/issues/comments/418079197","html_url":"https://github.com/zeromq/zeromq.js/issues/276#issuecomment-418079197","issue_url":"https://api.github.com/repos/zeromq/zeromq.js/issues/276","id":418079197,"node_id":"MDEyOklzc3VlQ29tbWVudDQxODA3OTE5Nw==","user":{"login":"ClosetMonkey","id":9686763,"node_id":"MDQ6VXNlcjk2ODY3NjM=","avatar_url":"https://avatars1.githubusercontent.com/u/9686763?v=4","gravatar_id":"","url":"https://api.github.com/users/ClosetMonkey","html_url":"https://github.com/ClosetMonkey","followers_url":"https://api.github.com/users/ClosetMonkey/followers","following_url":"https://api.github.com/users/ClosetMonkey/following{/other_user}","gists_url":"https://api.github.com/users/ClosetMonkey/gists{/gist_id}","starred_url":"https://api.github.com/users/ClosetMonkey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ClosetMonkey/subscriptions","organizations_url":"https://api.github.com/users/ClosetMonkey/orgs","repos_url":"https://api.github.com/users/ClosetMonkey/repos","events_url":"https://api.github.com/users/ClosetMonkey/events{/privacy}","received_events_url":"https://api.github.com/users/ClosetMonkey/received_events","type":"User","site_admin":false},"created_at":"2018-09-03T10:56:31Z","updated_at":"2018-09-03T10:56:31Z","author_association":"NONE","body":"I'll try this out on Ubuntu tomorrow but would love to know if I'm doing something wrong where this Windows box is concerned."}}
{"actor":{"display_login":"ClosetMonkey"}}