Go mongodb is to slow

It takes like 980.9938ms to 2 secons just to make a simple query.

here is my func

Maybe it is not about mongodb query, put more log into your step for benchmark.
If your func CheckPasswordHash use bcrypt algorithm, it may take time to compare password.https://stackoverflow.com/questions/15763086/bcrypt-for-password-hashing-because-it-is-slow

1 Like

Thanks for the response i fixed yeah it was bcrypt thanks men :stuck_out_tongue_winking_eye: i change bcrypt salt from 14 to 10.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.