hiredis-node icon indicating copy to clipboard operation
hiredis-node copied to clipboard

N-API Support for hiredis-node

Open NickNaso opened this issue 6 years ago • 5 comments

This PR contains initial work to port hiredis module to new N-API

NickNaso avatar Apr 09 '18 14:04 NickNaso

I'm seeing lots of build failures on Windows (but some successes). Is the plan to work through those or are they expected for the N-API implementation?

Happy to merge into the napi branch but again I'm completely unfamiliar with node.

michael-grunder avatar Apr 09 '18 15:04 michael-grunder

Hi @michael-grunder, I will continue work on this branch and I will try to solve all the problems in next days. After all problem will be fixed we can continue to iterate and publish the n-api version of the module.

NickNaso avatar Apr 09 '18 16:04 NickNaso

OK sounds great. I'll keep an eye on the PR.

michael-grunder avatar Apr 09 '18 17:04 michael-grunder

Any updates on this?

shirtleton avatar Nov 21 '18 19:11 shirtleton

Hi @shirtleton, I end the work, but I don't like the results in performance that I obtained, so I need some times to investigate. If you want help me, you're welcome.

This is what I obtain executing benchmark on the N-API version:

PING: 27210.88 ops/sec
SET: 28449.50 ops/sec
GET: 31007.75 ops/sec
LPUSH 8 bytes: 30165.91 ops/sec
LPUSH 64 bytes: 29761.90 ops/sec
LPUSH 512 bytes: 28694.40 ops/sec
LRANGE 10 elements, 8 bytes: 23419.20 ops/sec
LRANGE 100 elements, 8 bytes: 9237.88 ops/sec
LRANGE 100 elements, 64 bytes: 5486.97 ops/sec
LRANGE 100 elements, 512 bytes: 1179.45 ops/sec

This is what I obtain using the actual version of the add-on:

PING: 28449.50 ops/sec
SET: 29455.08 ops/sec
GET: 32362.46 ops/sec
LPUSH 8 bytes: 31545.74 ops/sec
LPUSH 64 bytes: 31298.90 ops/sec
LPUSH 512 bytes: 29985.01 ops/sec
LRANGE 10 elements, 8 bytes: 28530.67 ops/sec
LRANGE 100 elements, 8 bytes: 17391.30 ops/sec
LRANGE 100 elements, 64 bytes: 16666.67 ops/sec
LRANGE 100 elements, 512 bytes: 12232.42 ops/sec

I hope to solve all in a reasonable time.

NickNaso avatar Nov 21 '18 19:11 NickNaso