squeeze the last ms of performance out of the rewriter

This commit is contained in:
velzie 2024-07-17 18:42:20 -04:00
parent 213f7bfa2b
commit 41acba634d
No known key found for this signature in database
GPG key ID: 048413F95F0DDE1F
5 changed files with 31 additions and 152 deletions

View file

@ -110,7 +110,7 @@ export async function swfetch(
}
break;
case "script":
responseBody = rewriteJs(await response.text(), url);
responseBody = rewriteJs(await response.arrayBuffer(), url);
// Disable threading for now, it's causing issues.
// responseBody = await this.threadpool.rewriteJs(await responseBody.arrayBuffer(), url.toString());
break;