From 70227a0dbe91f6226f106457442958b5524c2c49 Mon Sep 17 00:00:00 2001 From: Barry Chen Date: Thu, 26 Mar 2026 11:50:29 -0500 Subject: [PATCH] perf: drop/de-allocate req body str explicitly after parsing In the BsoBodies::from_request extractor, the request body string is dropped at the end of its scope. But it can be explicitly dropped once it's no longer needed. --- syncserver/src/web/extractors/bso_bodies.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/syncserver/src/web/extractors/bso_bodies.rs b/syncserver/src/web/extractors/bso_bodies.rs index e9971c8e59..65a013efa9 100644 --- a/syncserver/src/web/extractors/bso_bodies.rs +++ b/syncserver/src/web/extractors/bso_bodies.rs @@ -134,6 +134,8 @@ impl FromRequest for BsoBodies { return future::err(make_error()); }; + drop(body); + // Validate all the BSO's, move invalid to our other list. Assume they'll all make // it with our pre-allocation let mut valid: Vec = Vec::with_capacity(bsos.len());