https://github.com/microsoft/TypeScript/pull/51387 Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code + Explore + All features + Documentation + GitHub Skills + Blog * Solutions + By Plan + Enterprise + Teams + Compare all + By Solution + CI/CD & Automation + DevOps + DevSecOps + Case Studies + Customer Stories + Resources * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles + Repositories + Topics + Trending + Collections * Pricing [ ] * # In this repository All GitHub | Jump to | * No suggested jump to results * # In this repository All GitHub | Jump to | * # In this organization All GitHub | Jump to | * # In this repository All GitHub | Jump to | Sign in Sign up {{ message }} microsoft / TypeScript Public * Notifications * Fork 11.1k * Star 85.6k * Code * Issues 5k+ * Pull requests 241 * Actions * Projects 8 * Wiki * Security * Insights More * Code * Issues * Pull requests * Actions * Projects * Wiki * Security * Insights New issue Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Pick a username [ ] Email Address [ ] Password [ ] [ ] Sign up for GitHub By clicking "Sign up for GitHub", you agree to our terms of service and privacy statement. We'll occasionally send you account related emails. Already on GitHub? Sign in to your account Jump to bottom Convert the codebase to modules #51387 Open jakebailey wants to merge 35 commits into microsoft:main base: main Choose a base branch [ ] Branches Tags Could not load branches Branch not found: {{ refName }} {{ refName }} default Could not load tags Nothing to show {{ refName }} default Are you sure you want to change the base? Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated. Change base from jakebailey:typeformer-2 Open Convert the codebase to modules #51387 jakebailey wants to merge 35 commits into microsoft:main from jakebailey:typeformer-2 +281,750 -283,896 Conversation 26 Commits 35 Checks 16 Files changed 655 Conversation This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters jakebailey Copy link Member @jakebailey jakebailey commented Nov 2, 2022 * edited This is it; the PR that converts the TypeScript repo from namespaces to modules. TL;DR: The TypeScript compiler is now implemented internally with modules, not namespaces. The compiler is now 10-25% faster. tsc is now 30% faster to start. Our npm package is now 43% smaller. More improvements are in the works. Closes #35210 Closes #39247 Closes #49037 Closes #49332 Closes #50758 For #27891 For #32949 For #34617 For those who are looking at the diff and wondering how they can see what this PR actually does, consider looking at each commit, or look at my silly stacked PR gerrit-clone thing at jakebailey#1 (which I will try to keep up to date). How? The bulk of the work to convert the repo to modules is done via automation, followed by a load of changes by hand to completely restructure our build system. To see the conversion process, take a look at the commits in this PR, each of which come with their own descriptive commit message. In short, the typeformer project recreates our old namespaces as "barrel" modules, reexporting each file from the barrel module corresponding to its original namespace. Symbols which previously were available "globally" via namespaces are now imported in big import blocks at the top of each file, in such a way that the final code looks nearly identical to the input (but unindented one level). This, with a little hand modification, gets us to a place where we can emit CJS and have everything working. However, this turns out to incur a big performance penalty; our old TS namespaces were just objects, but CJS imports/exports are more expensive than plain objects. Additionally, many consumers currently expect to be able to load TS as a single file, and that same file must be usable in Node and the browser. Unless we wanted to change that expectation and break the world, we needed to bundle. As an experiment while working on this conversion, I tried simply running esbuild on our source files directly; with a little more tweaking, I was able to produce a working output for our codebase. Unexpectedly, this also brought major performance wins in our benchmarks (see the next section). Those performance benefits (and speedy build times) were too good to pass up, and so, our main JS outputs are now produced by esbuild. To mitigate the risk of not using tsc's output, I have created a --bundle=false mode for our build. This mode uses tsc to emit CJS, producing modules matching src 1:1. This is tested in CI so we can reliably switch back to tsc's CJS emit if needed. The new build is also constructed such that it'd be easy to transition to running a bundler on tsc's ESM emit (rather than directly on src). Since our outputs are bundled, we needed a way to "bundle" our d.ts files too. To handle this, I wrote a small-ish (400 line) d.ts bundler that can serve our needs. This bundler is "dumb" and cannot handle cases that a more widely-usable bundler (like api-extractor) should, e.g. properly renaming types with the same name but declared in separate files or avoiding aliasing globals, which are cases that we can avoid or ignore, respectively. Benefits for users of TypeScript Firstly, the performance of the compiler has increased by anywhere from 10 to 25%. This largely thanks to scope lifting. TypeScript namespaces are emitted as a series of IIFEs which push properties onto a single object. Non-local accesses to exports of that namespace are implicitly fully qualified, incurring the overhead of an object access. With modules, all of our internal helpers have been lifted to the top and are available for direct calls. Secondly, our package is now ~43% smaller (from 63.6 MB down to 35.6 MB). This is due in part to dropping some redundant files from our package, including typescriptServices.js, which was identical to typescript.js (see the breaking changes section below), a change in the indentation used in our bundle files (4 spaces -> 2 spaces), plus a large amount of tree shaking in tsc.js and typingsInstaller.js. TypeScript 4.9 was made smaller by 2 MB already (thanks to #50421), so this is excellent progress. Finally, as a result of both of the previous performance improvements (faster code and less of it), tsc.js is 30% faster to start and typescript.js (our public API) is 10% faster to import. As we improve performance and code size, these numbers are likely to improve. We now include these metrics in our benchmarks to track over time and in relevant PRs. Benefits for the TypeScript team (and contributors) For those who work on TypeScript itself, this change comes with a number of important benefits. Now that we are modules, we are dogfooding the module experience. Effectively everyone is using modules and has been for a long time, but we've been using namespaces. This left us unable to experience things like auto-imports, giant import blocks, etc, ourselves. (During testing of this PR, we found multiple interesting auto-import and quick fix bugs; win!) Being modules also provides us the ability to start integrating excellent external tooling into our build process. As previously mentioned, our JS outputs are now produced by esbuild. This lets us start running tests in seconds (or less), representing a significant shortening of the develop/test/debug loop.^1 Of course, this is potentially limiting; if we need new syntax features that aren't yet implemented in esbuild, we can switch to bundling the ESM output of tsc instead, restoring the status quo. Additionally, since I had to change the entire build process to support this conversion, it's a great time to make build changes that would normally be difficult during our typical dev cycle. This includes replacing our task runner with a lightweight alternative (we don't need too much fanciness anymore), rewriting/deleting a number of scripts, and removing/replacing outdated dependencies. After this change, our npm audit is clean and our dev dependency count has been halved. No, we're not yet shipping ESM This PR does not convert the TypeScript package to ESM (#32949). The package still consists of a handful of un-tree-shakeable large files (though there are now fewer of them, and they are smaller). Allowing TypeScript to be packaged as ESM is a further challenge that will build on this change, but for this PR, the goal is to convert the repo's source files to modules without causing major breaks for downstream users. (For the future, see the "future" section below.) Breaking changes This conversion introduces a number of breaking changes for consumers of the TypeScript package; those using tsc or the language service in their editor should see no changes (besides improved performance and smaller install sizes). * typescriptServices.js has been removed; this file was identical to typescript.js, the entrypoint for our npm package. * protocol.d.ts is no longer included in the package; use tsserverlibrary.d.ts's ts.server.protocol namespace instead. * The output files have changed significantly; if you are patching TypeScript, you will definitely need to change your patches. + Since I know prettier post-processes our package to extract just enough of the codebase to parse code, I have created a proof-of-concept that can be expanded on to achieve a similar result with the new 5.0 output by using a tool like terser or rollup to tree-shake inside of the library itself. In the future, we may be able to improve this situation by restructuring our codebase in a way that allows us to export just the parser (Create a parser npm module #34617). cc @fisker * The TypeScript package now targets ES2018. Prior to 5.0, our package targeted ES5 syntax and the ES2015 library, however, esbuild has a hard minimum syntax target of ES2015 (aka ES6). ES2018 was chosen as a balance between compatibility with older environments and access to more modern syntax and library features.^2 + If you are looking to run the TypeScript compiler itself in an environment older than ES2018, you will need to downlevel our package's syntax and potentially polyfill the environment. (This may have already been the case; we don't test the TypeScript compiler on EOL versions of Node in CI and we're aware of a handful of cases where we were already using helpers outside our target range unconditionally.) The future? The module conversion opens the door to many future improvements. Our codebase is massively circular thanks to how easy it was to introduce cycles with namespaces. Namespace emit ordering was controlled by tsconfig.json, which allowed us to structure things "just right" and not crash, but things aren't so straightforward in modules. The modules themselves define their execution order, and the current state is one that works (even if the use of "namespace barrels" is suboptimal). But, this shouldn't be permanent; now that we are modules and it's not costly to introduce new files into the mix, we can start restructuring the codebase and unraveling our import cycles. In an ESM future, breaking these cycles may lead to improved tree shaking for those who bundle TypeScript into their codebases. In terms of performance, a small number of namespaces remain in the codebase (Debug, Parser, others) which would benefit from being converted to modules to allow for direct calls. We also lost some performance in our parser due to let/const (disproportionally so; the other parts of the compiler were only slightly affected but had much larger net wins). We may be able to restructure the parser to avoid the temporal dead zone performance cost.^3 In terms of code size, may even be able to do some amount of ESM emit now. A few of our bundles are not for import, only for execution (tsc, tsserver, typingsInstaller). If we are willing to drop versions of Node before ESM (Node <12), we can drop another 7 MB from our package by using esbuild's ESM code splitting for those bundles. In the process of making bundling work, I fixed monaco to no longer depend on the source-level structure of our package. This means that we could potentially start minifying our codebase, reducing the package size significantly. This is not without gotchas, of course; we know that there are downstream users who patch our package post-install, which is much more difficult when the output isn't predictably formatted (or effectively impossible using "patch" when minified). On the shoulders of giants I have many people to thank: * @weswigham and @elibarzilay, who authored the previous versions of the typeformer project. They did most of the hard work in conceptualizing how this could be possible and providing a base set of transforms to get it done. * @dsherret, for the excellent ts-morph, with which I rewrote the typeformer project for excellent TS-to-TS source modification fidelity. * @evanw, for the excellent esbuild, which gives us speedy build times and an output that is faster for our users. * Everyone on the team who tested this PR out early and helped iron out the bugs. This PR touches effectively every line of code in the project; testing is key! --------------------------------------------------------------------- PR notes: * This PR MUST be merged via a merge commit. Squashing will break .git-blame-ignore-revs as it references specific commits in the PR that git blame should ignore; I want to ignore only the automated steps in this PR. I have attempted to make this PR as few commits as possible while still making sense. * The breaking changes listed above need to be added to the wiki (without all of my exposition). * Until the point at which we are ready to merge this, expect this PR to either have conflicts. The nature of this transformation means that any change to src in main will cause this PR to have conflicts, and the only way to fix that is to rerun the entire transformation from scratch and force push. Footnotes 1. Specifically, the time it takes to to run the "local" build task (everything but tests) has been reduced from ~30s to ~20s on my machine. When changing the checker, the build time has been reduced from ~18s to ~14 seconds. When changing nothing, the build time has been reduced from 1.3s to 0.7s. - 2. ES2018 is the ECMAScript version implemented by Node 10. We could have bumped to ES2019 (Node 12), but this would only give us optional catch binding; we already conditionally use newer library features like trimStart / trimEnd. We could have also bumped up to ES2020 (Node 14, though, see Recommended tsconfig.json target option for Node 14 is ES2020 which is not fully supported by Node 14. #46325), which would give us native nullish coalescing and optional chaining, but it seemed like too big of a jump to drop Node 12, even if it is end-of-life and untested in our CI. - 3. In an earlier revision of this stack, I used babel to downlevel let/const to var after bundling. This increased performance as expected, but we decided to not add this step; in the ESM future, we wouldn't want to end up with all of our export const declarations turning into export var, and avoiding the transformation simplifies the build and improves the debugging experience when loops are involved. If we change our minds, this is easy to reimplement, albeit slow. - Sorry, something went wrong. 143 robpalme, RyanCavanaugh, styfle, a-tarasyuk, Kyza, anuraghazra, evanw, esdmr, gimyboya, michaelhays, and 133 more reacted with thumbs up emoji 114 andrewbranch, alyahmedaly, RyanCavanaugh, styfle, savannahostrowski, gulshan, a-tarasyuk, Kyza, anuraghazra, evanw, and 104 more reacted with hooray emoji [?] 102 heejaechang, andrewbranch, styfle, RyanCavanaugh, theMosaad, a-tarasyuk, anuraghazra, Kyza, evanw, QuiiBz, and 92 more reacted with heart emoji 107 andrewbranch, RyanCavanaugh, styfle, alexrock, atk, theMosaad, a-tarasyuk, Kyza, anuraghazra, ElianCordoba, and 97 more reacted with rocket emoji 8 jaydenseric, brunojppb, lzehrung, ild0tt0re, yonycalsin, devjoseluis, flipsi, and seanhuggins1 reacted with eyes emoji All reactions * 143 reactions * 114 reactions * [?] 102 reactions * 107 reactions * 8 reactions jakebailey added 15 commits Nov 2, 2022 @jakebailey Make a few changes to allow all code to be loaded as one project 86e6fcb @jakebailey Explicitly reference ts namespace in tsserverlibrary 647ded2 @jakebailey Generated module conversion step - unindent ... 04a062c This step makes further commits look clearer by unindenting all of the top level namespaces preemptively. @jakebailey Generated module conversion step - explicitify ... 76a4d13 This step makes all implicit namespace accesses explicit, e.g. "Node" turns into "ts.Node". @jakebailey Generated module conversion step - stripNamespaces ... 87d2dc4 This step converts each file into an exported module by hoisting the namespace bodies into the global scope and transferring internal markers down onto declarations as needed. The namespaces are reconstructed as "barrel"-style modules, which are identical to the old namespace objects in structure. These reconstructed namespaces are then imported in the newly module-ified files, making existing expressions like "ts." valid. @jakebailey Generated module conversion step - inlineImports ... 21fde5b This step converts as many explicit accesses as possible in favor of direct imports from the modules in which things were declared. This restores the code (as much as possible) back to how it looked originally before the explicitify step, e.g. instead of "ts.Node" and "ts.Symbol", we have just "Node" and "Symbol". @jakebailey Generated module conversion step - .git-ignore-blame-revs 9ef10d1 @jakebailey Add gitlens settings suggestion ... 62285de While GitHub automatically uses this file if present, GitLens in VS Code does not. Add the right option to our example settings.json for those who use the extension. Unfortunately, you can't leave this enabled if you want to look at the repo _without_ the file; git blame just crashes when the file isn't present. I'm not sure that there's a workaround for that. @jakebailey Make processDiagnosticMessages generate a module e7fbe5e @jakebailey Fix up linting, make lint clean ... b492ca5 Now that we are modules, there's no reason to ban multiple namespaces per file; each file is its own scope and declaring a namespace won't merge it into any other files. @jakebailey Undo changes needed to load codebase into ts-morph 291af98 @jakebailey Add JSDoc eslint rule ... 61300ad See the next commit for a more fleshed-out description. @jakebailey Fix all internal JSDoc comments ... 163a41d If these are regular comments, then they won't appear in our d.ts files. But, now we are relying on an external d.ts bundler to produce our final merged, so they need to be present in the "input" d.ts files, meaning they have to be JSDoc comments. These comments only work today because all of our builds load their TS files from scratch, so they see the actual source files and their non-JSDoc comments. The comments also need to be attached to a declaration, not floating, otherwise they won't be used by api-extractor, so move them if needed. @jakebailey Convert require calls to imports ... 64b015c Although the existing require calls would work fine, it's more consistent to make them actual imports and let them be converted at compile/bundle time. It also lets us emit ESM if needed. There are still conditional requires present for things like the node System, but that's a more difficult problem to solve. @jakebailey Remove typescriptServices, protocol.d.ts, typescript_standalone.d.ts ... 6231cfe This is the same as TypeScript PR 51026. @typescript-bot typescript-bot assigned jakebailey Nov 2, 2022 @typescript-bot typescript-bot added the Author: Team label Nov 2, 2022 @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 Thanks for the PR! It looks like you've changed the TSServer protocol in some way. Please ensure that any changes here don't break consumers of the current TSServer API. For some extra review, we'll ping @sheetalkamat, @amcasey, @mjbvz, @minestarks for you. Feel free to loop in other consumers/maintainers if necessary All reactions Sorry, something went wrong. @typescript-bot typescript-bot assigned weswigham Nov 2, 2022 @typescript-bot typescript-bot added the For Milestone Bug PRs that fix a bug with a specific milestone label Nov 2, 2022 @jakebailey Copy link Member Author jakebailey commented Nov 2, 2022 @typescript-bot test this @typescript-bot test top100 @typescript-bot user test this @typescript-bot user test tsserver @typescript-bot test tsserver top100 @typescript-bot run dt @typescript-bot perf test this @typescript-bot pack this 1 ryan4664 reacted with thumbs up emoji All reactions * 1 reaction Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the diff-based top-repos suite (tsserver) on this PR at 4ddaab5. You can monitor the build here. Update: The results are in! All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the tarball bundle task on this PR at 4ddaab5. You can monitor the build here. All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the extended test suite on this PR at 4ddaab5. You can monitor the build here. All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the parallelized Definitely Typed test suite on this PR at 4ddaab5. You can monitor the build here. All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the diff-based user code test suite on this PR at 4ddaab5. You can monitor the build here. Update: The results are in! All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the perf test suite on this PR at 4ddaab5. You can monitor the build here. Update: The results are in! All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the diff-based top-repos suite on this PR at 4ddaab5. You can monitor the build here. All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Heya @jakebailey, I've started to run the diff-based user code test suite (tsserver) on this PR at 4ddaab5. You can monitor the build here. Update: The results are in! All reactions Sorry, something went wrong. @jakebailey jakebailey mentioned this pull request Nov 2, 2022 Migrate the TypeScript Project to Use Modules #35210 Open 9 hidden items Load more... jakebailey added 6 commits Nov 2, 2022 @jakebailey Ensure ts object passed to plugins contains deprecatedCompat declarat... ... 1447bd3 ...ions We pass the entire "ts" object into plugins. However, we need to make sure that that object contains the debug compat helpers. In the old codebase, the deprecated compat code would tack things onto the actual ts object, after the server code was executed, and later that same object would be given to plugins. But in modules, each TS project only sees the view of the "ts" namespace that their references implied, not the ts object as some sort of singleton. To ensure that plugins get the debug compat code, we have to bring that into each project's view of the ts namespace, and not add it on later in the executable projects. @jakebailey Move compiler-debug into Debug namespace, which allows the compiler t... ... 5d75a42 ...o be tree shaken This debug code was added quite a while ago, constructed such that we wouldn't have to ship this code to our users. However, this is the sole place in the compiler project where the ts namespace "escapes" the bundle. By moving this debug code into the compiler itself, we no longer have any references to the ts namespace itself for our bundles that don't export anything (tsc, typingsInstaller). This lets bundlers tree shake the compiler, reducing the size of our output by _5.7 MB_ (a ridiculous improvement for _adding_ code). @jakebailey Remove Promise redeclaration ... a34fa12 Now that we target ES2018, we don't need to declare this ourselves. @jakebailey Remove globalThisShim and globalThis modification for TypeScriptServi... ... 63a4306 ...cesFactory Looking at github, sourcegraph, and internally, nobody appears to use this factory at all. It's still used within our testing framework, so I won't remove it, but we shouldn't be polyfilling globalThis and sticking things onto it these days. @jakebailey Disable slow CodeQL queries ... 1c89b38 See issue 10937 on github.com/github/codeql. @jakebailey Remove outFiles from launch.json ... 23272cd The troubleshooting wizard for the debugger actually says that this option is no longer recommended; removing it enables us to use source maps if we happen to be debugging while in --bundle=false mode. @jakebailey jakebailey force-pushed the typeformer-2 branch from 4ddaab5 to 23272cd Compare Nov 2, 2022 @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 * edited Hey @jakebailey, I've packed this into an installable tgz. You can install it for testing by referencing it in your package.json like so: { "devDependencies": { "typescript": "https://typescript.visualstudio.com/cf7ac146-d525-443c-b23c-0d58337efebc/_apis/build/builds/137480/artifacts?artifactName=tgz&fileId=08B819ABB40DEE8CC5C34203005549FD20C0C0D9489D7C8D01E9D8A9C76FF4C102&fileName=/typescript-5.0.0-insiders.20221102.tgz" } } and then running npm install. --------------------------------------------------------------------- There is also a playground for this build and an npm module you can use via "typescript": "npm:@typescript-deploys/ pr-build@5.0.0-pr-51387-10".; All reactions Sorry, something went wrong. @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 @jakebailey Here are the results of running the user test suite comparing main and refs/pull/51387/merge: Everything looks good! All reactions Sorry, something went wrong. 1 similar comment @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 @jakebailey Here are the results of running the user test suite comparing main and refs/pull/51387/merge: Everything looks good! All reactions Sorry, something went wrong. @zachkirsch Copy link zachkirsch commented Nov 2, 2022 Wahoo!! 4 OzakIOne, maranomynet, mikimaine, and tonivj5 reacted with thumbs up emoji 1 OzakIOne reacted with laugh emoji 2 OzakIOne and tavindev reacted with hooray emoji All reactions * 4 reactions * 1 reaction * 2 reactions Sorry, something went wrong. @jakebailey jakebailey added Breaking Change Would introduce errors in existing code API Relates to the public API for TypeScript and removed Breaking Change Would introduce errors in existing code labels Nov 2, 2022 @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 @jakebailey The results of the perf run you requested are in! Here they are: Compiler Comparison Report - main..51387 [Metric] [main] [51387] [Delta] [Best] [Worst] [Angular - node (v18.10.0, x64)] [Memory [353,963k (+- [341,189k (+- [-12,774k (- [340,973k [341,325k used] 0.02%)] 0.02%)] 3.61%)] ] ] [Parse [1.56s (+- [1.56s (+- [+0.01s (+ [1.53s] [1.61s] Time] 0.49%)] 1.07%)] 0.51%)] [Bind [0.61s (+- [0.53s (+- [-0.07s [0.52s] [0.54s] Time] 0.60%)] 1.09%)] (-12.05%)] [Check [4.42s (+- [4.04s (+- [-0.38s (- [3.97s] [4.13s] Time] 0.55%)] 0.81%)] 8.71%)] [Emit [4.93s (+- [4.24s (+- [-0.68s [4.16s] [4.28s] Time] 0.64%)] 0.68%)] (-13.86%)] [Total [11.51s (+- [10.38s (+- [-1.13s (- [10.22s] [10.48s] Time] 0.46%)] 0.54%)] 9.83%)] [Compiler-Unions - node (v18.10.0, x64)] [Memory [200,772k (+- [189,497k (+- [-11,275k (- [184,501k [190,132k used] 0.62%)] 0.65%)] 5.62%)] ] ] [Parse [0.60s (+- [0.62s (+- [+0.02s (+ [0.61s] [0.63s] Time] 1.33%)] 0.76%)] 3.49%)] [Bind [0.36s (+- [0.33s (+- [-0.04s (- [0.32s] [0.33s] Time] 0.94%)] 1.04%)] 9.92%)] [Check [5.37s (+- [4.97s (+- [-0.40s (- [4.88s] [5.07s] Time] 0.75%)] 0.80%)] 7.41%)] [Emit [1.81s (+- [1.53s (+- [-0.28s [1.50s] [1.57s] Time] 0.81%)] 0.96%)] (-15.57%)] [Total [8.15s (+- [7.46s (+- [-0.70s (- [7.35s] [7.59s] Time] 0.71%)] 0.63%)] 8.54%)] [Monaco - node (v18.10.0, x64)] [Memory [331,748k (+- [320,323k (+- [-11,425k (- [320,228k [320,396k used] 0.01%)] 0.01%)] 3.44%)] ] ] [Parse [1.17s (+- [1.16s (+- [-0.01s (- [1.13s] [1.18s] Time] 0.65%)] 1.01%)] 0.94%)] [Bind [0.56s (+- [0.49s (+- [-0.07s [0.48s] [0.50s] Time] 1.25%)] 0.98%)] (-13.19%)] [Check [4.31s (+- [3.87s (+- [-0.44s [3.81s] [3.93s] Time] 0.90%)] 0.64%)] (-10.31%)] [Emit [2.61s (+- [2.24s (+- [-0.38s [2.21s] [2.28s] Time] 0.72%)] 0.82%)] (-14.43%)] [Total [8.66s (+- [7.75s (+- [-0.91s [7.67s] [7.86s] Time] 0.71%)] 0.57%)] (-10.52%)] [TFS - node (v18.10.0, x64)] [Memory [294,811k (+- [283,086k (+- [-11,725k (- [282,571k [284,787k used] 0.01%)] 0.15%)] 3.98%)] ] ] [Parse [0.94s (+- [0.96s (+- [+0.02s (+ [0.93s] [1.00s] Time] 1.05%)] 1.28%)] 2.56%)] [Bind [0.60s (+- [0.45s (+- [-0.15s [0.42s] [0.55s] Time] 3.95%)] 5.92%)] (-25.67%)] [Check [4.01s (+- [3.79s (+- [-0.22s (- [3.72s] [3.83s] Time] 0.67%)] 0.63%)] 5.49%)] [Emit [2.63s (+- [2.18s (+- [-0.45s [2.15s] [2.21s] Time] 0.60%)] 0.76%)] (-17.25%)] [Total [8.18s (+- [7.38s (+- [-0.81s (- [7.32s] [7.45s] Time] 0.72%)] 0.40%)] 9.86%)] [material-ui - node (v18.10.0, x64)] [Memory [439,901k (+- [428,116k (+- [-11,785k (- [428,021k [428,314k used] 0.01%)] 0.02%)] 2.68%)] ] ] [Parse [1.37s (+- [1.34s (+- [-0.02s (- [1.32s] [1.38s] Time] 0.84%)] 1.05%)] 1.68%)] [Bind [0.44s (+- [0.49s (+- [+0.05s [0.48s] [0.50s] Time] 1.07%)] 1.00%)] (+12.27%)] [Check [10.83s (+- [10.07s (+- [-0.76s (- [9.91s] [10.22s] Time] 0.24%)] 0.71%)] 7.04%)] [Emit [0.00s (+- [0.00s (+- [0.00s ( [0.00s] [0.00s] Time] 0.00%)] 0.00%)] NaN%)] [Total [12.64s (+- [11.91s (+- [-0.73s (- [11.75s] [12.07s] Time] 0.22%)] 0.62%)] 5.80%)] [xstate - node (v18.10.0, x64)] [Memory [557,292k (+- [518,650k (+- [-38,642k (- [518,577k [518,712k used] 0.01%)] 0.01%)] 6.93%)] ] ] [Parse [1.91s (+- [1.91s (+- [0.00s ( [1.89s] [1.94s] Time] 0.56%)] 0.64%)] 0.00%)] [Bind [0.69s (+- [0.78s (+- [+0.09s [0.73s] [0.82s] Time] 2.31%)] 2.75%)] (+12.46%)] [Check [1.10s (+- [1.04s (+- [-0.06s (- [1.01s] [1.06s] Time] 0.62%)] 0.96%)] 5.52%)] [Emit [0.06s (+- [0.06s (+- [-0.00s (- [0.05s] [0.06s] Time] 0.00%)] 5.97%)] 5.00%)] [Total [3.76s (+- [3.78s (+- [+0.03s (+ [3.73s] [3.84s] Time] 0.52%)] 0.64%)] 0.67%)] [Angular - node (v16.17.1, x64)] [Memory [353,451k (+- [340,567k (+- [-12,885k (- [340,356k [340,667k used] 0.02%)] 0.02%)] 3.65%)] ] ] [Parse [1.90s (+- [1.87s (+- [-0.03s (- [1.85s] [1.90s] Time] 0.53%)] 0.47%)] 1.58%)] [Bind [0.75s (+- [0.64s (+- [-0.11s [0.64s] [0.66s] Time] 0.89%)] 0.76%)] (-14.13%)] [Check [5.70s (+- [5.11s (+- [-0.59s [5.05s] [5.17s] Time] 0.46%)] 0.55%)] (-10.36%)] [Emit [6.10s (+- [5.06s (+- [-1.04s [4.96s] [5.12s] Time] 0.47%)] 0.67%)] (-17.11%)] [Total [14.46s (+- [12.69s (+- [-1.77s [12.59s] [12.77s] Time] 0.39%)] 0.34%)] (-12.22%)] [Compiler-Unions - node (v16.17.1, x64)] [Memory [198,088k (+- [188,067k (+- [-10,021k (- [185,981k [189,586k used] 0.49%)] 0.65%)] 5.06%)] ] ] [Parse [0.79s (+- [0.79s (+- [+0.00s (+ [0.78s] [0.79s] Time] 1.22%)] 0.43%)] 0.25%)] [Bind [0.45s (+- [0.42s (+- [-0.04s (- [0.41s] [0.42s] Time] 0.89%)] 0.89%)] 7.98%)] [Check [6.43s (+- [5.93s (+- [-0.50s (- [5.87s] [5.99s] Time] 0.56%)] 0.52%)] 7.75%)] [Emit [2.26s (+- [1.90s (+- [-0.36s [1.86s] [1.94s] Time] 0.85%)] 1.02%)] (-16.05%)] [Total [9.92s (+- [9.03s (+- [-0.89s (- [8.96s] [9.13s] Time] 0.34%)] 0.50%)] 9.01%)] [Monaco - node (v16.17.1, x64)] [Memory [331,211k (+- [319,611k (+- [-11,600k (- [319,554k [319,651k used] 0.02%)] 0.01%)] 3.50%)] ] ] [Parse [1.43s (+- [1.43s (+- [-0.01s (- [1.41s] [1.44s] Time] 0.62%)] 0.71%)] 0.63%)] [Bind [0.69s (+- [0.59s (+- [-0.10s [0.59s] [0.60s] Time] 0.84%)] 0.50%)] (-14.57%)] [Check [5.47s (+- [4.85s (+- [-0.62s [4.82s] [4.90s] Time] 0.58%)] 0.50%)] (-11.35%)] [Emit [3.25s (+- [2.69s (+- [-0.56s [2.65s] [2.72s] Time] 0.50%)] 0.63%)] (-17.28%)] [Total [10.85s (+- [9.56s (+- [-1.29s [9.52s] [9.66s] Time] 0.36%)] 0.34%)] (-11.91%)] [TFS - node (v16.17.1, x64)] [Memory [294,130k (+- [282,238k (+- [-11,892k (- [282,172k [282,258k used] 0.02%)] 0.01%)] 4.04%)] ] ] [Parse [1.23s (+- [1.16s (+- [-0.06s (- [1.14s] [1.18s] Time] 0.89%)] 0.71%)] 5.21%)] [Bind [0.64s (+- [0.67s (+- [+0.03s (+ [0.58s] [0.72s] Time] 1.37%)] 3.75%)] 4.35%)] [Check [5.14s (+- [4.74s (+- [-0.40s (- [4.69s] [4.81s] Time] 0.45%)] 0.56%)] 7.86%)] [Emit [3.49s (+- [2.74s (+- [-0.75s [2.65s] [2.86s] Time] 0.40%)] 2.18%)] (-21.50%)] [Total [10.50s (+- [9.31s (+- [-1.19s [9.16s] [9.51s] Time] 0.39%)] 1.04%)] (-11.37%)] [material-ui - node (v16.17.1, x64)] [Memory [439,323k (+- [427,401k (+- [-11,923k (- [427,380k [427,411k used] 0.02%)] 0.00%)] 2.71%)] ] ] [Parse [1.72s (+- [1.64s (+- [-0.08s (- [1.62s] [1.67s] Time] 1.19%)] 0.81%)] 4.88%)] [Bind [0.54s (+- [0.50s (+- [-0.04s (- [0.49s] [0.52s] Time] 0.63%)] 1.33%)] 6.89%)] [Check [12.44s (+- [11.58s (+- [-0.87s (- [11.47s] [11.77s] Time] 0.57%)] 0.62%)] 6.95%)] [Emit [0.00s (+- [0.00s (+- [0.00s ( [0.00s] [0.00s] Time] 0.00%)] 0.00%)] NaN%)] [Total [14.70s (+- [13.72s (+- [-0.98s (- [13.63s] [13.92s] Time] 0.46%)] 0.57%)] 6.69%)] [xstate - node (v16.17.1, x64)] [Memory [554,924k (+- [516,288k (+- [-38,636k (- [516,155k [516,473k used] 0.01%)] 0.01%)] 6.96%)] ] ] [Parse [2.31s (+- [2.31s (+- [-0.00s (- [2.28s] [2.33s] Time] 0.35%)] 0.46%)] 0.22%)] [Bind [0.89s (+- [0.84s (+- [-0.05s (- [0.81s] [0.89s] Time] 2.01%)] 1.77%)] 5.17%)] [Check [1.43s (+- [1.35s (+- [-0.08s (- [1.33s] [1.36s] Time] 0.80%)] 0.52%)] 5.86%)] [Emit [0.07s (+- [0.06s (+- [-0.01s [0.06s] [0.06s] Time] 4.37%)] 0.00%)] (-11.76%)] [Total [4.70s (+- [4.57s (+- [-0.14s (- [4.53s] [4.59s] Time] 0.39%)] 0.35%)] 2.89%)] [Angular - node (v14.15.1, x64)] [Memory [347,641k (+- [334,066k (+- [-13,575k (- [334,031k [334,115k used] 0.01%)] 0.01%)] 3.91%)] ] ] [Parse [2.07s (+- [2.06s (+- [-0.02s (- [2.03s] [2.08s] Time] 0.45%)] 0.51%)] 0.77%)] [Bind [0.80s (+- [0.70s (+- [-0.10s [0.68s] [0.71s] Time] 0.87%)] 1.06%)] (-12.61%)] [Check [6.00s (+- [5.52s (+- [-0.48s (- [5.45s] [5.60s] Time] 0.40%)] 0.70%)] 8.03%)] [Emit [6.29s (+- [5.26s (+- [-1.03s [5.14s] [5.37s] Time] 0.94%)] 1.14%)] (-16.34%)] [Total [15.16s (+- [13.54s (+- [-1.62s [13.33s] [13.73s] Time] 0.43%)] 0.74%)] (-10.71%)] [Compiler-Unions - node (v14.15.1, x64)] [Memory [190,940k (+- [182,029k (+- [-8,911k (- [180,480k [184,472k used] 0.67%)] 0.65%)] 4.67%)] ] ] [Parse [0.86s (+- [0.90s (+- [+0.04s (+ [0.89s] [0.91s] Time] 0.47%)] 0.49%)] 5.01%)] [Bind [0.49s (+- [0.46s (+- [-0.03s (- [0.46s] [0.47s] Time] 1.06%)] 0.48%)] 6.11%)] [Check [6.78s (+- [6.29s (+- [-0.48s (- [6.17s] [6.35s] Time] 0.55%)] 0.63%)] 7.13%)] [Emit [2.43s (+- [2.06s (+- [-0.37s [2.02s] [2.17s] Time] 0.88%)] 1.60%)] (-15.35%)] [Total [10.56s (+- [9.71s (+- [-0.84s (- [9.63s] [9.82s] Time] 0.39%)] 0.40%)] 7.98%)] [Monaco - node (v14.15.1, x64)] [Memory [326,563k (+- [314,468k (+- [-12,095k (- [314,372k [314,561k used] 0.01%)] 0.02%)] 3.70%)] ] ] [Parse [1.59s (+- [1.59s (+- [-0.00s (- [1.57s] [1.61s] Time] 0.75%)] 0.63%)] 0.06%)] [Bind [0.73s (+- [0.64s (+- [-0.09s [0.63s] [0.66s] Time] 0.41%)] 1.10%)] (-12.70%)] [Check [5.76s (+- [5.21s (+- [-0.55s (- [5.18s] [5.25s] Time] 0.39%)] 0.25%)] 9.58%)] [Emit [3.39s (+- [2.88s (+- [-0.50s [2.85s] [2.94s] Time] 0.38%)] 0.80%)] (-14.86%)] [Total [11.47s (+- [10.32s (+- [-1.15s [10.27s] [10.44s] Time] 0.18%)] 0.35%)] (-10.03%)] [TFS - node (v14.15.1, x64)] [Memory [289,789k (+- [279,265k (+- [-10,525k (- [279,185k [279,325k used] 0.01%)] 0.01%)] 3.63%)] ] ] [Parse [1.29s (+- [1.35s (+- [+0.06s (+ [1.31s] [1.39s] Time] 0.48%)] 1.37%)] 4.50%)] [Bind [0.80s (+- [0.59s (+- [-0.21s [0.58s] [0.60s] Time] 0.45%)] 0.80%)] (-26.24%)] [Check [5.40s (+- [5.10s (+- [-0.30s (- [5.08s] [5.17s] Time] 0.35%)] 0.40%)] 5.52%)] [Emit [3.61s (+- [3.06s (+- [-0.55s [2.99s] [3.12s] Time] 0.84%)] 0.89%)] (-15.20%)] [Total [11.11s (+- [10.11s (+- [-1.00s (- [10.03s] [10.17s] Time] 0.33%)] 0.32%)] 9.04%)] [material-ui - node (v14.15.1, x64)] [Memory [435,469k (+- [422,806k (+- [-12,663k (- [422,708k [422,860k used] 0.00%)] 0.01%)] 2.91%)] ] ] [Parse [1.90s (+- [1.89s (+- [-0.01s (- [1.88s] [1.92s] Time] 0.92%)] 0.49%)] 0.53%)] [Bind [0.59s (+- [0.54s (+- [-0.05s (- [0.53s] [0.55s] Time] 0.62%)] 0.96%)] 8.02%)] [Check [12.87s (+- [12.09s (+- [-0.79s (- [11.94s] [12.24s] Time] 0.38%)] 0.64%)] 6.10%)] [Emit [0.00s (+- [0.00s (+- [0.00s ( [0.00s] [0.00s] Time] 0.00%)] 0.00%)] NaN%)] [Total [15.36s (+- [14.52s (+- [-0.84s (- [14.36s] [14.69s] Time] 0.35%)] 0.55%)] 5.49%)] [xstate - node (v14.15.1, x64)] [Memory [543,999k (+- [504,396k (+- [-39,603k (- [504,336k [504,458k used] 0.01%)] 0.01%)] 7.28%)] ] ] [Parse [2.61s (+- [2.64s (+- [+0.03s (+ [2.60s] [2.69s] Time] 0.59%)] 0.77%)] 1.11%)] [Bind [0.98s (+- [0.85s (+- [-0.13s [0.84s] [0.87s] Time] 1.17%)] 0.76%)] (-13.33%)] [Check [1.51s (+- [1.48s (+- [-0.03s (- [1.47s] [1.49s] Time] 0.39%)] 0.40%)] 1.98%)] [Emit [0.07s (+- [0.07s (+- [-0.00s (- [0.07s] [0.07s] Time] 3.14%)] 0.00%)] 1.41%)] [Total [5.18s (+- [5.05s (+- [-0.13s (- [4.99s] [5.07s] Time] 0.35%)] 0.37%)] 2.55%)] System [Machine Name] [ts-ci-ubuntu] [Platform] [linux 5.4.0-126-generic] [Architecture] [x64] [Available Memory] [16 GB] [Available Memory] [15 GB] [CPUs] [4 x Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz] Hosts * node (v18.10.0, x64) * node (v16.17.1, x64) * node (v14.15.1, x64) Scenarios * Angular - node (v18.10.0, x64) * Angular - node (v16.17.1, x64) * Angular - node (v14.15.1, x64) * Compiler-Unions - node (v18.10.0, x64) * Compiler-Unions - node (v16.17.1, x64) * Compiler-Unions - node (v14.15.1, x64) * Monaco - node (v18.10.0, x64) * Monaco - node (v16.17.1, x64) * Monaco - node (v14.15.1, x64) * TFS - node (v18.10.0, x64) * TFS - node (v16.17.1, x64) * TFS - node (v14.15.1, x64) * material-ui - node (v18.10.0, x64) * material-ui - node (v16.17.1, x64) * material-ui - node (v14.15.1, x64) * xstate - node (v18.10.0, x64) * xstate - node (v16.17.1, x64) * xstate - node (v14.15.1, x64) [Benchmark] [Name] [Iterations] [Current] [51387] [10] [Baseline] [main] [10] TSServer Comparison Report - main..51387 [Metric] [main] [51387] [Delta] [Best] [Worst] [Compiler-UnionsTSServer - node (v18.10.0, x64)] [Req 1 - [1,066ms (+- [1,058ms (+- [-9ms (- [1,042ms [1,081ms updateOpen] 0.34%)] 0.73%)] 0.83%)] ] ] [Req 2 - geterr] [2,738ms (+- [2,525ms (+- [-212ms (- [2,488ms [2,565ms 0.48%)] 0.85%)] 7.75%)] ] ] [Req 3 - [191ms (+- [166ms (+- [-26ms [165ms] [168ms] references] 0.97%)] 0.42%)] (-13.32%)] [Req 4 - navto] [147ms (+- [140ms (+- [-7ms (- [137ms] [152ms] 1.34%)] 2.21%)] 4.97%)] [Req 5 - [1,356 (+- [1,356 (+- [0 ( completionInfo 0.00%)] 0.00%)] 0.00%)] [1,356] [1,356] count] [Req 5 - [44ms (+- [61ms (+- [+17ms [57ms] [62ms] completionInfo] 1.27%)] 2.32%)] (+38.58%)] [CompilerTSServer - node (v18.10.0, x64)] [Req 1 - [1,132ms (+- [1,113ms (+- [-20ms (- [1,087ms [1,128ms updateOpen] 0.81%)] 0.82%)] 1.75%)] ] ] [Req 2 - geterr] [1,616ms (+- [1,513ms (+- [-103ms (- [1,496ms [1,544ms 0.58%)] 0.63%)] 6.38%)] ] ] [Req 3 - [198ms (+- [176ms (+- [-22ms [167ms] [196ms] references] 0.95%)] 4.29%)] (-11.16%)] [Req 4 - navto] [161ms (+- [175ms (+- [+14ms (+ [149ms] [200ms] 1.18%)] 9.71%)] 8.83%)] [Req 5 - [1,518 (+- [1,518 (+- [0 ( completionInfo 0.00%)] 0.00%)] 0.00%)] [1,518] [1,518] count] [Req 5 - [86ms (+- [52ms (+- [-34ms [48ms] [56ms] completionInfo] 6.89%)] 4.33%)] (-39.93%)] [xstateTSServer - node (v18.10.0, x64)] [Req 1 - [1,628ms (+- [1,521ms (+- [-107ms (- [1,497ms [1,547ms updateOpen] 0.43%)] 0.68%)] 6.59%)] ] ] [Req 2 - geterr] [570ms (+- [556ms (+- [-14ms (- [545ms] [569ms] 0.63%)] 0.85%)] 2.44%)] [Req 3 - [52ms (+- [59ms (+- [+7ms [57ms] [62ms] references] 1.28%)] 2.22%)] (+13.27%)] [Req 4 - navto] [207ms (+- [196ms (+- [-11ms (- [193ms] [198ms] 0.85%)] 0.64%)] 5.08%)] [Req 5 - [3,209 (+- [3,149 (+- [-60 (- completionInfo 0.00%)] 0.00%)] 1.87%)] [3,149] [3,149] count] [Req 5 - [209ms (+- [210ms (+- [+1ms (+ [205ms] [216ms] completionInfo] 1.79%)] 1.29%)] 0.53%)] [Compiler-UnionsTSServer - node (v16.17.1, x64)] [Req 1 - [1,329ms (+- [1,309ms (+- [-20ms (- [1,293ms [1,323ms updateOpen] 0.37%)] 0.50%)] 1.52%)] ] ] [Req 2 - geterr] [3,266ms (+- [3,071ms (+- [-196ms (- [3,018ms [3,097ms 0.72%)] 0.53%)] 5.99%)] ] ] [Req 3 - [224ms (+- [195ms (+- [-30ms [191ms] [199ms] references] 1.19%)] 0.89%)] (-13.21%)] [Req 4 - navto] [158ms (+- [157ms (+- [-1ms (- [149ms] [203ms] 0.61%)] 7.29%)] 0.63%)] [Req 5 - [1,356 (+- [1,356 (+- [0 ( completionInfo 0.00%)] 0.00%)] 0.00%)] [1,356] [1,356] count] [Req 5 - [53ms (+- [61ms (+- [+8ms [56ms] [72ms] completionInfo] 1.16%)] 6.30%)] (+15.44%)] [CompilerTSServer - node (v16.17.1, x64)] [Req 1 - [1,411ms (+- [1,376ms (+- [-35ms (- [1,356ms [1,388ms updateOpen] 0.46%)] 0.59%)] 2.45%)] ] ] [Req 2 - geterr] [2,123ms (+- [1,995ms (+- [-129ms (- [1,981ms [2,013ms 0.48%)] 0.40%)] 6.06%)] ] ] [Req 3 - [232ms (+- [199ms (+- [-34ms [195ms] [202ms] references] 0.78%)] 0.79%)] (-14.43%)] [Req 4 - navto] [172ms (+- [167ms (+- [-4ms (- [164ms] [171ms] 1.22%)] 0.89%)] 2.50%)] [Req 5 - [1,518 (+- [1,518 (+- [0 ( completionInfo 0.00%)] 0.00%)] 0.00%)] [1,518] [1,518] count] [Req 5 - [52ms (+- [56ms (+- [+4ms (+ [55ms] [59ms] completionInfo] 1.43%)] 2.13%)] 7.65%)] [xstateTSServer - node (v16.17.1, x64)] [Req 1 - [1,920ms (+- [1,814ms (+- [-106ms (- [1,792ms [1,832ms updateOpen] 0.52%)] 0.52%)] 5.52%)] ] ] [Req 2 - geterr] [734ms (+- [712ms (+- [-22ms (- [702ms] [720ms] 0.59%)] 0.64%)] 3.02%)] [Req 3 - [60ms (+- [67ms (+- [+7ms [66ms] [69ms] references] 1.25%)] 1.26%)] (+11.09%)] [Req 4 - navto] [209ms (+- [198ms (+- [-11ms (- [194ms] [202ms] 0.81%)] 0.94%)] 5.37%)] [Req 5 - [3,209 (+- [3,149 (+- [-60 (- completionInfo 0.00%)] 0.00%)] 1.87%)] [3,149] [3,149] count] [Req 5 - [259ms (+- [250ms (+- [-9ms (- [248ms] [252ms] completionInfo] 0.73%)] 0.39%)] 3.36%)] [Compiler-UnionsTSServer - node (v14.15.1, x64)] [Req 1 - [1,453ms (+- [1,462ms (+- [+9ms (+ [1,447ms [1,476ms updateOpen] 0.60%)] 0.50%)] 0.63%)] ] ] [Req 2 - geterr] [3,548ms (+- [3,357ms (+- [-191ms (- [3,323ms [3,397ms 0.72%)] 0.50%)] 5.38%)] ] ] [Req 3 - [234ms (+- [206ms (+- [-28ms [204ms] [209ms] references] 0.38%)] 0.59%)] (-11.86%)] [Req 4 - navto] [174ms (+- [165ms (+- [-8ms (- [160ms] [180ms] 0.82%)] 2.29%)] 4.73%)] [Req 5 - [1,356 (+- [1,356 (+- [0 ( completionInfo 0.00%)] 0.00%)] 0.00%)] [1,356] [1,356] count] [Req 5 - [56ms (+- [65ms (+- [+9ms [61ms] [74ms] completionInfo] 3.73%)] 5.19%)] (+15.25%)] [CompilerTSServer - node (v14.15.1, x64)] [Req 1 - [1,528ms (+- [1,542ms (+- [+14ms (+ [1,524ms [1,555ms updateOpen] 0.71%)] 0.47%)] 0.93%)] ] ] [Req 2 - geterr] [2,332ms (+- [2,190ms (+- [-142ms (- [2,176ms [2,203ms 0.68%)] 0.30%)] 6.09%)] ] ] [Req 3 - [246ms (+- [215ms (+- [-31ms [211ms] [220ms] references] 0.44%)] 1.03%)] (-12.75%)] [Req 4 - navto] [184ms (+- [178ms (+- [-6ms (- [174ms] [180ms] 0.65%)] 0.90%)] 3.43%)] [Req 5 - [1,518 (+- [1,518 (+- [0 ( completionInfo 0.00%)] 0.00%)] 0.00%)] [1,518] [1,518] count] [Req 5 - [55ms (+- [61ms (+- [+6ms [61ms] [61ms] completionInfo] 1.35%)] 0.00%)] (+10.31%)] [xstateTSServer - node (v14.15.1, x64)] [Req 1 - [2,144ms (+- [2,048ms (+- [-96ms (- [2,008ms [2,080ms updateOpen] 0.73%)] 0.91%)] 4.47%)] ] ] [Req 2 - geterr] [760ms (+- [746ms (+- [-14ms (- [742ms] [753ms] 0.52%)] 0.33%)] 1.83%)] [Req 3 - [67ms (+- [73ms (+- [+7ms [70ms] [77ms] references] 2.61%)] 2.18%)] (+10.23%)] [Req 4 - navto] [230ms (+- [221ms (+- [-9ms (- [218ms] [225ms] 0.96%)] 0.63%)] 3.87%)] [Req 5 - [3,209 (+- [3,149 (+- [-60 (- completionInfo 0.00%)] 0.00%)] 1.87%)] [3,149] [3,149] count] [Req 5 - [279ms (+- [277ms (+- [-2ms (- [268ms] [286ms] completionInfo] 1.01%)] 1.79%)] 0.72%)] System [Machine Name] [ts-ci-ubuntu] [Platform] [linux 5.4.0-126-generic] [Architecture] [x64] [Available Memory] [16 GB] [Available Memory] [15 GB] [CPUs] [4 x Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz] Hosts * node (v18.10.0, x64) * node (v16.17.1, x64) * node (v14.15.1, x64) Scenarios * Compiler-UnionsTSServer - node (v18.10.0, x64) * Compiler-UnionsTSServer - node (v16.17.1, x64) * Compiler-UnionsTSServer - node (v14.15.1, x64) * CompilerTSServer - node (v18.10.0, x64) * CompilerTSServer - node (v16.17.1, x64) * CompilerTSServer - node (v14.15.1, x64) * xstateTSServer - node (v18.10.0, x64) * xstateTSServer - node (v16.17.1, x64) * xstateTSServer - node (v14.15.1, x64) [Benchmark] [Name] [Iterations] [Current] [51387] [10] [Baseline] [main] [10] Startup Comparison Report - main..51387 [Metric] [main] [51387] [Delta] [Best] [Worst] [tsc-startup - node (v16.17.1, x64)] [Execution [158.07ms (+- [117.80ms (+- [-40.27ms [115.63ms [127.81ms time] 0.38%)] 0.42%)] (-25.48%)] ] ] [tsserver-startup - node (v16.17.1, x64)] [Execution [222.85ms (+- [199.11ms (+- [-23.74ms [195.57ms [208.26ms time] 0.30%)] 0.36%)] (-10.65%)] ] ] [tsserverlibrary-startup - node (v16.17.1, x64)] [Execution [211.02ms (+- [188.57ms (+- [-22.45ms [185.48ms [197.64ms time] 0.30%)] 0.37%)] (-10.64%)] ] ] [typescript-startup - node (v16.17.1, x64)] [Execution [200.94ms (+- [174.15ms (+- [-26.79ms [171.22ms [181.93ms time] 0.31%)] 0.35%)] (-13.33%)] ] ] System [Machine Name] [ts-ci-ubuntu] [Platform] [linux 5.4.0-126-generic] [Architecture] [x64] [Available Memory] [16 GB] [Available Memory] [15 GB] [CPUs] [4 x Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz] Hosts * node (v16.17.1, x64) Scenarios * tsc-startup - node (v16.17.1, x64) * tsserver-startup - node (v16.17.1, x64) * tsserverlibrary-startup - node (v16.17.1, x64) * typescript-startup - node (v16.17.1, x64) [Benchmark] [Name] [Iterations] [Current] [51387] [10] [Baseline] [main] [10] Developer Information: Download Benchmark [?] 2 Maxwell2022 and ddaletski reacted with heart emoji All reactions * [?] 2 reactions Sorry, something went wrong. @evanw Copy link evanw commented Nov 2, 2022 Congrats! This is very exciting. I believe this PR also closes #39247 . 11 DanielRosenwasser, alexgorbatchev, jakebailey, tonivj5, transitive-bullshit, joca-immersa, jgoz, fratzinger, maciejcieslar, rojasleon, and ddaletski reacted with thumbs up emoji All reactions * 11 reactions Sorry, something went wrong. @jakebailey Copy link Member Author jakebailey commented Nov 2, 2022 * edited It does! Thanks. [?] 1 orta reacted with heart emoji All reactions * [?] 1 reaction Sorry, something went wrong. @jakebailey jakebailey mentioned this pull request Nov 2, 2022 Opportunity: Improve compiler performance by avoiding property accesses #39247 Open @DanielRosenwasser DanielRosenwasser added this to the TypeScript 5.0.0 milestone Nov 2, 2022 @typescript-bot Copy link Collaborator typescript-bot commented Nov 2, 2022 @jakebailey Here are the results of running the top-repos suite comparing main and refs/pull/51387/merge: Something interesting changed - please have a look. Details palantir/blueprint [?][?] Note that built also had errors [?][?] Req #18874 - references at getContextualType (/typescript-main/built/local/tsserver.js:74562:35) at getApparentTypeOfContextualType (/typescript-main/built/local/tsserver.js:74495:17) at getContextualType (/typescript-main/built/local/tsserver.js:74600:32) at getApparentTypeOfContextualType (/typescript-main/built/local/tsserver.js:74495:17) at getContextualSignature (/typescript-main/built/local/tsserver.js:74890:24) at getNarrowedTypeOfSymbol (/typescript-main/built/local/tsserver.js:73166:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73254:24) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:71930:32) at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:71877:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73325:28) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:71930:32) at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:71877:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73325:28) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:71930:32) at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:71877:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73325:28) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:71930:32) at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:71877:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73325:28) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:71930:32) at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:71877:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73325:28) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:71930:32) at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:71877:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73325:28) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) at getTypeAtFlowNode (/typescript-main/built/local/tsserver.js:71930:32) at getFlowTypeOfReference (/typescript-main/built/local/tsserver.js:71877:51) at checkIdentifier (/typescript-main/built/local/tsserver.js:73325:28) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81579:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at checkPropertyAccessExpression (/typescript-main/built/local/tsserver.js:76160:85) at checkExpressionWorker (/typescript-main/built/local/tsserver.js:81613:28) at checkExpression (/typescript-main/built/local/tsserver.js:81528:38) at checkNonNullExpression (/typescript-main/built/local/tsserver.js:76080:37) at getEffectsSignature (/typescript-main/built/local/tsserver.js:71699:36) at getTypeAtFlowCall (/typescript-main/built/local/tsserver.js:72064:33) Req #18874 - references at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69710:35) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69756:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at getEffectsSignature (/typescript-51387/built/local/tsserver.js:61622:24) at getTypeAtFlowCall (/typescript-51387/built/local/tsserver.js:61920:27) at getTypeAtFlowNode (/typescript-51387/built/local/tsserver.js:61815:20) at getFlowTypeOfReference (/typescript-51387/built/local/tsserver.js:61772:47) at checkIdentifier (/typescript-51387/built/local/tsserver.js:62874:24) at checkExpressionWorker (/typescript-51387/built/local/tsserver.js:69722:18) at checkExpression (/typescript-51387/built/local/tsserver.js:69681:34) at checkNonNullExpression (/typescript-51387/built/local/tsserver.js:65051:31) at checkPropertyAccessExpression (/typescript-51387/built/local/tsserver.js:65130:164) Last few requests {"seq":18871,"type":"request","command":"definitionAndBoundSpan","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":271552}} {"seq":18872,"type":"request","command":"completionInfo","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":271811,"includeExternalModuleExports":false,"includeInsertTextCompletions":true,"triggerKind":1}} {"seq":18873,"type":"request","command":"completionEntryDetails","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":271811,"entryNames":["arguments"]}} {"seq":18874,"type":"request","command":"references","arguments":{"file":"@PROJECT_ROOT@/site/docs/versions/2/docs-app.js","line":1,"offset":272120}} Repro Steps 1. git clone https://github.com/palantir/blueprint --recurse-submodules 2. In dir blueprint, run git reset --hard 98e89b250a5c9621cb7d9507b5b3aeac03c3fcf6 3. In dir blueprint, run yarn install --ignore-engines --ignore-scripts --silent 4. Back in the initial folder, download RepoResults4/ palantir.blueprint.replay.txt from the artifact folder 5. npm install --no-save @typescript/server-replay 6. npx tsreplay ./blueprint ./palantir.blueprint.replay.txt path/to/ tsserver.js 7. npx tsreplay --help to learn about helpful switches for debugging, logging, etc 1 madnight reacted with eyes emoji All reactions * 1 reaction Sorry, something went wrong. @jakebailey Copy link Member Author jakebailey commented Nov 2, 2022 Interesting break, I'll look into it. Note that since main has changed, this PR is now broken again (as expected); I won't be able to run any new tasks on this without a rebase, as noted in the PR description. All reactions Sorry, something went wrong. @jakebailey Copy link Member Author jakebailey commented Nov 2, 2022 Apparently it's not my break, and is happening elsewhere: #51218 Phew! All reactions Sorry, something went wrong. Benonardo Benonardo approved these changes Nov 2, 2022 View changes @johnnyreilly Copy link johnnyreilly commented Nov 2, 2022 This is amazing work! A data point related to potentially dropping Node versions prior to Node 12: If we are willing to drop versions of Node before ESM (Node <12), we can drop another 7 MB from our package by using esbuild's ESM code splitting for those bundles. Regrettably at present custom Azure Pipeline tasks that are built in TypeScript are run with either Node 6 or Node 10. I think your suggestion of dropping support for Node <12 pertains to usage of TypeScript itself. In the case of the custom Azure Pipeline tasks, the need is purely that we can compile to ES6 for when the task is run: https://learn.microsoft.com/en-us/azure/devops/extend/ develop/add-build-task?view=azure-devops# create-tsconfigjson-compiler-options long story, short: I don't think this would be an issue from that angle, but in case I've misunderstood I thought I'd mention it. But more significantly, amazing work! Well done and thank you [?] 1 jakebailey reacted with heart emoji All reactions * [?] 1 reaction Sorry, something went wrong. @fisker Copy link fisker commented Nov 2, 2022 In the future, we may be able to improve this situation by restructuring our codebase in a way that allows us to export just the parser Looking forward! [?] All reactions Sorry, something went wrong. @jakebailey Copy link Member Author jakebailey commented Nov 2, 2022 * edited Regrettably at present custom Azure Pipeline tasks that are built in TypeScript are run with either microsoft/azure-pipelines-agent #3195. Yes, the whole "could we be ESM?" thing is what prompted Daniel's twitter poll. If I'm understanding this correctly, it sounds like what people need for these tasks is for TS to still support emitting code that works on Node 6 or 10, not that they actually need to run the compiler itself in these tasks. In which case, that does provide us with more data that shows we can raise our minimum "engine" to Node 12. @johnnyreilly Is that accurate? 1 styfle reacted with thumbs up emoji All reactions * 1 reaction Sorry, something went wrong. @johnnyreilly Copy link johnnyreilly commented Nov 2, 2022 * edited It is, yes. So I think it would be fine. As it happens I've just been doing some digging, and it looks like Node 16 may now actually be supported (no announcement and I haven't tested - @AndreyIvanov42 may be able to advise further) microsoft/azure-pipelines-agent#3861 So yeah, I don't think this would be a blocker for exactly the reason you state: If I'm understanding this correctly, it sounds like what people need for these tasks is for TS to still support emitting code that works on Node 6 or 10, not that they actually need to run the compiler itself in these tasks. In which case, that does provide us with more data that shows we can raise our minimum "engine" to Node 12. 1 jakebailey reacted with thumbs up emoji All reactions * 1 reaction Sorry, something went wrong. @jakebailey Copy link Member Author jakebailey commented Nov 2, 2022 Thanks for the clarification! I don't think emit for those old targets is going away any time soon (per #51000), so this is good news for me. [?] 2 johnnyreilly and ghishadow reacted with heart emoji All reactions * [?] 2 reactions Sorry, something went wrong. @jakebailey Copy link Member Author jakebailey commented Nov 2, 2022 I updated the PR description to mention this, but if you are interested in looking at this PR without being totally overwhelmed by the size of the diff, I would recommend looking at each individual commit (which include descriptions), or look at my silly gerrit-alike PR stack here: jakebailey#1 That, and https://github.com/jakebailey/typeformer where the code that produces this stack actually lives. 1 dlannoye reacted with thumbs up emoji All reactions * 1 reaction Sorry, something went wrong. @dbrgn dbrgn mentioned this pull request Nov 2, 2022 Add .git-blame-ignore-revs file LibrePCB/LibrePCB#1062 Merged Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment Reviewers @Benonardo Benonardo Assignees @weswigham weswigham @jakebailey jakebailey Labels API Relates to the public API for TypeScript Author: Team For Milestone Bug PRs that fix a bug with a specific milestone Projects None yet Milestone TypeScript 5.0.0 Development Successfully merging this pull request may close these issues. Can we stop shipping typescriptServices.js? Module conversion tracking issue / notes Determining Module Migration and Shipping Strategy Opportunity: Improve compiler performance by avoiding property accesses Migrate the TypeScript Project to Use Modules 9 participants @jakebailey @typescript-bot @zachkirsch @evanw @johnnyreilly @fisker @Benonardo @DanielRosenwasser @weswigham Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Footer (c) 2022 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time. You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.