Skip to content

Design Meeting Notes, 3/15/2024 #57793

Open
@DanielRosenwasser

Description

@DanielRosenwasser

Make executables thin wrappers around public API

#55326

  • Public API of TypeScript is in typescript.js
    • Everything in tsserver.js depends on the same stuff as the API.
    • Same-ish is true of typingsInstaller.js
  • Have a PR where these files just import parts of the API from each executable. tsserver.js and typingsInstaller.js just become <1000 lines of code on top of typescript.js.
  • Great size reduction for our npm package size and editors that ship their own tsserver.js and typingsInstaller.js.
  • Runtime speed does not seem to be impacted.
  • What about tsc.js?
    • [experiment] make tsc use the public API #57703
    • tsc.js is roughly another a entry-point to our API.
    • You can get the same size reduction with this.
    • Significant regressions!
      • It's not just straight runtime, it's also start-up speed because of the extra code.
      • Different implementation of constructors with different orders?
        • It warrants an investigation.

Instantiation count in baselines

#57730

  • We have no way to detect blow-ups of logic in the compiler other than our perf suite.
  • But our test suite has a lot of esoteric work integrated into it.
  • Idea is record a few metrics (assignability cache size, type count, instantiation count, symbol count) into our baseline outputs.
    • Rounded so that minor changes don't cause noise.
    • Have a threshold for each metric as well so not every test gets it.
  • We like it.

🥳

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design NotesNotes from our design meetings

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions