mirror of
https://github.com/MercuryWorkshop/scramjet.git
synced 2025-05-15 15:30:00 -04:00
use autosorting btreeset (via indexset) and optimize for speed
This commit is contained in:
parent
33744b4e83
commit
9b15201b25
5 changed files with 98 additions and 60 deletions
|
@ -54,7 +54,9 @@ function rewriteJsWrapper(
|
|||
} else {
|
||||
timespan = "really slow";
|
||||
}
|
||||
console.log(`oxc rewrite was ${timespan} (${duration}ms)`);
|
||||
console.log(
|
||||
`oxc rewrite for "${url || "(unknown)"}" was ${timespan} (${duration}ms)`
|
||||
);
|
||||
}
|
||||
|
||||
return typeof input === "string" ? decoder.decode(js) : js;
|
||||
|
|
|
@ -302,7 +302,8 @@ async function rewriteBody(
|
|||
return response.body;
|
||||
}
|
||||
case "script":
|
||||
return rewriteJs(await response.arrayBuffer(), response.url, meta);
|
||||
// @ts-ignore perc idk why
|
||||
return rewriteJs(await response.arrayBuffer(), response.finalURL, meta);
|
||||
case "style":
|
||||
return rewriteCss(await response.text(), meta);
|
||||
case "sharedworker":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue