From 319c9c3b52ad118b259855e2540990461737e017 Mon Sep 17 00:00:00 2001 From: github-actions Date: Sat, 7 Dec 2024 23:38:23 -0500 Subject: [PATCH] httpx performance boost --- bbot/modules/httpx.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bbot/modules/httpx.py b/bbot/modules/httpx.py index 136e14119..8edc4e1d6 100644 --- a/bbot/modules/httpx.py +++ b/bbot/modules/httpx.py @@ -144,9 +144,9 @@ async def handle_batch(self, *events): command += ["-http-proxy", proxy] async for line in self.run_process_live(command, text=False, input=list(stdin), stderr=subprocess.DEVNULL): try: - j = orjson.loads(line) + j = await self.helpers.run_in_executor(orjson.loads, line) except orjson.JSONDecodeError: - self.debug(f"Failed to decode line: {line}") + self.warning(f"httpx failed to decode line: {line}") continue url = j.get("url", "")