{"action":"created","issue":{"url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/36","repository_url":"https://api.github.com/repos/alexhultman/uWebSockets","labels_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/36/comments","events_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/36/events","html_url":"https://github.com/alexhultman/uWebSockets/issues/36","id":147119627,"number":36,"title":"Optimize JS wrapper","user":{"login":"alexhultman","id":3397140,"avatar_url":"https://avatars.githubusercontent.com/u/3397140?v=3","gravatar_id":"","url":"https://api.github.com/users/alexhultman","html_url":"https://github.com/alexhultman","followers_url":"https://api.github.com/users/alexhultman/followers","following_url":"https://api.github.com/users/alexhultman/following{/other_user}","gists_url":"https://api.github.com/users/alexhultman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexhultman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexhultman/subscriptions","organizations_url":"https://api.github.com/users/alexhultman/orgs","repos_url":"https://api.github.com/users/alexhultman/repos","events_url":"https://api.github.com/users/alexhultman/events{/privacy}","received_events_url":"https://api.github.com/users/alexhultman/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/alexhultman/uWebSockets/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/alexhultman/uWebSockets/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":33,"created_at":"2016-04-09T11:06:53Z","updated_at":"2016-04-14T08:44:24Z","closed_at":null,"body":"@ronkorving Like I said, minimizing the JS overhead of each ws socket is something I see as very important and that would be awesome if you wanted to look at. It requires about 800 mb of memory for 1 million connections for me currently. The native server consumes 250 mb of memory, so any optimization to JS-land is appreciated."},"comment":{"url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/comments/209832844","html_url":"https://github.com/alexhultman/uWebSockets/issues/36#issuecomment-209832844","issue_url":"https://api.github.com/repos/alexhultman/uWebSockets/issues/36","id":209832844,"user":{"login":"alexhultman","id":3397140,"avatar_url":"https://avatars.githubusercontent.com/u/3397140?v=3","gravatar_id":"","url":"https://api.github.com/users/alexhultman","html_url":"https://github.com/alexhultman","followers_url":"https://api.github.com/users/alexhultman/followers","following_url":"https://api.github.com/users/alexhultman/following{/other_user}","gists_url":"https://api.github.com/users/alexhultman/gists{/gist_id}","starred_url":"https://api.github.com/users/alexhultman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexhultman/subscriptions","organizations_url":"https://api.github.com/users/alexhultman/orgs","repos_url":"https://api.github.com/users/alexhultman/repos","events_url":"https://api.github.com/users/alexhultman/events{/privacy}","received_events_url":"https://api.github.com/users/alexhultman/received_events","type":"User","site_admin":false},"created_at":"2016-04-14T08:44:24Z","updated_at":"2016-04-14T08:44:24Z","body":"That would be incorrect. C++ is about a million times more optimizable than JS, and from V8 (which of course is the lowest level you can get in terms of JS) you can set hidden pointers to JS objects which are about a million times faster and more lightweight than setting/getting variables from \"JS objects\" (which are basically exactly like hashmaps in other languages). But I do not know if this will improve it significantly in this case."}}