{"action":"created","issue":{"url":"https://api.github.com/repos/apihlaja/node-irsdk/issues/33","repository_url":"https://api.github.com/repos/apihlaja/node-irsdk","labels_url":"https://api.github.com/repos/apihlaja/node-irsdk/issues/33/labels{/name}","comments_url":"https://api.github.com/repos/apihlaja/node-irsdk/issues/33/comments","events_url":"https://api.github.com/repos/apihlaja/node-irsdk/issues/33/events","html_url":"https://github.com/apihlaja/node-irsdk/issues/33","id":278807654,"number":33,"title":"Port to N-API?","user":{"login":"apihlaja","id":8148584,"avatar_url":"https://avatars3.githubusercontent.com/u/8148584?v=4","gravatar_id":"","url":"https://api.github.com/users/apihlaja","html_url":"https://github.com/apihlaja","followers_url":"https://api.github.com/users/apihlaja/followers","following_url":"https://api.github.com/users/apihlaja/following{/other_user}","gists_url":"https://api.github.com/users/apihlaja/gists{/gist_id}","starred_url":"https://api.github.com/users/apihlaja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apihlaja/subscriptions","organizations_url":"https://api.github.com/users/apihlaja/orgs","repos_url":"https://api.github.com/users/apihlaja/repos","events_url":"https://api.github.com/users/apihlaja/events{/privacy}","received_events_url":"https://api.github.com/users/apihlaja/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-12-03T18:40:27Z","updated_at":"2017-12-30T10:44:26Z","closed_at":null,"author_association":"OWNER","body":"It seems Node.js have new API for native addons, should take a look if it makes sense to port: https://github.com/nodejs/node-addon-api"},"comment":{"url":"https://api.github.com/repos/apihlaja/node-irsdk/issues/comments/354539476","html_url":"https://github.com/apihlaja/node-irsdk/issues/33#issuecomment-354539476","issue_url":"https://api.github.com/repos/apihlaja/node-irsdk/issues/33","id":354539476,"user":{"login":"apihlaja","id":8148584,"avatar_url":"https://avatars3.githubusercontent.com/u/8148584?v=4","gravatar_id":"","url":"https://api.github.com/users/apihlaja","html_url":"https://github.com/apihlaja","followers_url":"https://api.github.com/users/apihlaja/followers","following_url":"https://api.github.com/users/apihlaja/following{/other_user}","gists_url":"https://api.github.com/users/apihlaja/gists{/gist_id}","starred_url":"https://api.github.com/users/apihlaja/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apihlaja/subscriptions","organizations_url":"https://api.github.com/users/apihlaja/orgs","repos_url":"https://api.github.com/users/apihlaja/repos","events_url":"https://api.github.com/users/apihlaja/events{/privacy}","received_events_url":"https://api.github.com/users/apihlaja/received_events","type":"User","site_admin":false},"created_at":"2017-12-30T10:44:26Z","updated_at":"2017-12-30T10:44:26Z","author_association":"OWNER","body":"N-API is experimental as of Node.js v9: https://nodejs.org/dist/v9.3.0/docs/api/addons.html#addons_n_api\r\n\r\nAs far as I understood, current [`nan`](https://github.com/nodejs/nan) based C++ code should continue to work. So there is no immediate need to port to new API, but porting might make it easier to improve performance. Not like I'd have noticed any performance issues but obviously you dont want to waste CPU cycles when driving.\r\n\r\nThe current version of `node-irsdk` runs in main event loop, and polls memory mapped file from javascript. That's something I would like to get rid of ie. C++ addon should be event emitter itself and do polling in C++ land. It seems running outside of main event loop will be a bit easier with N-API: https://nodejs.org/dist/v9.3.0/docs/api/n-api.html#n_api_custom_asynchronous_operations"}}
{"actor":{"display_login":"apihlaja"}}