3 ms·
> Anything will be CPU-heavy if you give it enough work. Not in a relative sense. If authorization is 5% of the work, scaling it leaves it at 5% of the work,
by Dylan16807 8y ago
> Anything will be CPU-heavy if you give it enough work.
Not in a relative sense. If authorization is 5% of the work, scaling it leaves it at 5% of the work, and it's never a bottleneck. Authorization was being a significant bottleneck, not a tiny percent, and that is somewhat surprising.
- andy_ppp 8y agoObviously authorisation will be a huge overhead compared to sendfile + nginx right? Am I misunderstanding what npm does?
- Dylan16807 8y agoI mean, to use sendfile you need to open the file, and that does a permission check too...
- andy_ppp 8y agoNo I'm talking about private NPM right. The perms on the file system are not equal to (or as costly as) the auth I need to have to access my private NPM repo.