diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-12-03 03:07:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-03 02:07:04 +0000 |
commit | 39c7d8dafe00fd619afac7de0151790e7d53cd43 (patch) | |
tree | 3881a0cf6b92090a8d8a1457354bd8f9d26d8a70 /cli/tsc/99_main_compiler.js | |
parent | f6b889b43219e3c9be770c8b2758bff3048ddcbd (diff) |
refactor: faster args for op_load in TSC (#21438)
This commit changes the argument that "op_load" accepts, from
a serde struct to "&str". This should equal to a slightly better
performance.
Diffstat (limited to 'cli/tsc/99_main_compiler.js')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index b72a3b0ef..3f67ccb24 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -525,7 +525,7 @@ delete Object.prototype.__proto__; if (logDebug) { debug(`host.readFile("${specifier}")`); } - return ops.op_load({ specifier }).data; + return ops.op_load(specifier).data; }, getCancellationToken() { // createLanguageService will call this immediately and cache it @@ -555,9 +555,7 @@ delete Object.prototype.__proto__; } /** @type {{ data: string; scriptKind: ts.ScriptKind; version: string; }} */ - const fileInfo = ops.op_load( - { specifier }, - ); + const fileInfo = ops.op_load(specifier); if (!fileInfo) { return undefined; } |