The six-second
sign-in.
A merchant signing in to Auto Drop could spend about six seconds waiting for the login request to finish. I profiled the login path and found that older accounts carried the cost of an earlier bcrypt configuration.
Login latency
The diagnosis
I traced the time spent inside the login request. Most of it was in bcrypt.compare for accounts with a high cost factor in their stored hash. That setting determines how much work bcrypt repeats every time it checks the password.
The change
I migrated each affected account on its next successful sign-in. The existing hash still verified the submitted password. Once verification succeeded, I hashed that same password with a bcrypt cost factor of 10 and stored the replacement.
This timing mattered. A stored bcrypt hash cannot be converted into a new hash of the original password by changing its cost field. Successful authentication provided the password needed for the update, and the merchant kept using the same credentials.
The result
Login time fell from about six seconds to under one second. Each account paid the legacy verification cost on the login that migrated it. Later sign-ins used its new hash.