From a1c807cd9571f956de656dd1dcb558323f3705aa Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sun, 23 Aug 2026 23:14:20 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20Bolt:=20Offload=20CPU-bound=20bcryp?= =?UTF-8?q?t=20operations=20to=20threadpool?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In FastAPI, running CPU-bound tasks like password hashing/verification synchronously blocks the entire event loop, destroying concurrency. This change offloads these operations to `starlette.concurrency.run_in_threadpool`. Co-authored-by: benpiper <4343814+benpiper@users.noreply.github.com> --- .jules/bolt.md | 4 ++++ backend/auth.py | 17 ++++++++++++----- backend/main.py | 6 +++--- 3 files changed, 19 insertions(+), 8 deletions(-) diff --git a/.jules/bolt.md b/.jules/bolt.md index e6d39e6..b09726f 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 `