3 ms·
I have my doubts and confusion about this problem statement > Most of the operations npm performs are network-bound and JavaScript is able to underpin an imple
by truth_seeker 8y ago
I have my doubts and confusion about this problem statement
> Most of the operations npm performs are network-bound and JavaScript is able to underpin an implementation that meets the performance goals. However, looking at the authorization service that determines whether a user is allowed to,
say, publish a particular package, they saw a CPUbound task that was projected to become a performance bottleneck.
Oh, Really ???
So essentially Authorization service and I doubt the security algorithms computation are the main cause.
What i dont understand here is why is it not possible to write lower level JS or asm code to craft a well optimized code which V8 can totally nail to minimum CPU instructions required?
- spricket 8y agoMy guess is that this uses public key cryptography. Generating a signature is rather expensive. We found this out the hard way a few years ago, when we tried to verify OAuth tokens using RSA rather than HMAC. The server was hammered at maybe 500 signatures a second, greatly slowing down token generation. I'm guessing they dropped to Rust so they could use native C libraries for signature generation.