parse-server icon indicating copy to clipboard operation
parse-server copied to clipboard

bCrypt is very slow, how to solve

Open lenew opened this issue 10 years ago • 2 comments

User Login api is very slow due to bCrypt. About 4 queries per sec on Amazon EC2 single core machine. Node prof tools shows that about 89% cpu cycles are used by bCrypt function "encipher". Any good solution to this?

lenew avatar Apr 14 '16 08:04 lenew

bcrypt is slow by design

Maybe parse-server could offer some ENV_VARS to configure bcrypt?

framp avatar Apr 14 '16 15:04 framp

Thats correct, this is by design. Tuning bcrypt might be a reasonable solution, but making it work with existing passwords would not be easy. It's not in our roadmap but we would welcome PRs!

drew-gross avatar Apr 14 '16 21:04 drew-gross