Skip to content

[nightly][performance] 97% of time spent reading type dependencies when --noCheck and --isolatedDeclarations is enabledΒ #58863

Closed
@MichaelMitchell-at

Description

@MichaelMitchell-at

πŸ”Ž Search Terms

noCheck isolatedDeclarations

πŸ•— Version & Regression Information

⏯ Playground Link

No response

πŸ’» Code

// @strict: true
// @declaration: true
// @isolatedDeclarations: true
// @allowJs: false
// @noCheck: true

// @filename: index.ts
export { type Falsey } from "lodash";

πŸ™ Actual behavior

Ran the above code using tsc --generateTrace trace_dir which produced the following trace.
trace.json

If you load this trace into https://speedscope.app you can see that out of 271ms, about 97% of the time is spent parsing and binding @types/lodash and lib.d.ts and only 6ms is spent on the actual emit.

which seems superfluous and a huge optimization opportunity if we can skip these steps. cc @weswigham @jakebailey @dragomirtitian

πŸ™‚ Expected behavior

No time is spent parsing and binding and emit takes up most of the time

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions