Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use N-API #1

Merged
merged 8 commits into from
Mar 17, 2019
Merged

Use N-API #1

merged 8 commits into from
Mar 17, 2019

Conversation

mischnic
Copy link
Member

I did this mainly because the current master doesn't compile on Node 11 (the deprecation warnings in Node 10 turned into fatal errors).

Uses https://github.com/nodejs/node-addon-api

The code might not be optimal yet: Interesting/Strangely, this changes the write performance (NAN usually 0.7-1.2 ms and NAPI 1.5-2.4 or even 4 ms on macOS):
NAN:

read: 12.758ms
[ { path:
     'fschanges/token.txt',
    type: 'update' } ]
write: 0.747ms

N-API:

node index.js
read: 11.063ms
[ { path:
     'fschanges/token.txt',
    type: 'update' } ]
write: 1.256ms

@mischnic mischnic marked this pull request as ready for review March 17, 2019 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants