From a94b4cb0737b851249ede47e1e2ba40c29021245 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Mon, 17 Aug 2026 23:39:33 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Bolt:=20Offload=20bcrypt=20operatio?= =?UTF-8?q?ns=20to=20threadpool=20in=20async=20routes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Offloaded CPU-bound `bcrypt` operations in `backend/auth.py` to `starlette.concurrency.run_in_threadpool`. Modified `verify_password` and `get_password_hash` to be async and updated their call sites in `backend/auth.py` and `backend/main.py`. This prevents `bcrypt` from blocking the `asyncio` event loop during login and registration, improving concurrent performance. Co-authored-by: benpiper <4343814+benpiper@users.noreply.github.com> --- .jules/bolt.md | 4 ++++ backend/auth.py | 12 +++++++----- backend/main.py | 6 +++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.jules/bolt.md b/.jules/bolt.md index e6d39e6..d4379d7 100644 --- a/.jules/bolt.md +++ b/.jules/bolt.md @@ -16,3 +16,7 @@ ## 2024-06-28 - Optimize array lookups in high-frequency React event handlers **Learning:** Even if data is pre-processed/memoized (like cached `parsedTimestamps`), performing an O(N) linear search on that array inside a high-frequency event handler (like `