Skip to content

[Performance regression] Performance regression in Typescript 5.1 on large files #60353

Closed as not planned
@moufmouf

Description

@moufmouf

🔎 Search Terms

performance regression, Typescript 5.1

🕗 Version & Regression Information

  • This changed between versions 5.0.4 and 5.1
  • This changed in commit 511921e (detected via every-ts)
  • This is the behavior in every version I tried after 5.1, including the latest 5.6 version

⏯ Playground Link

https://github.com/moufmouf/typescript-perf-issue

💻 Code

See Github repo for the code sample (the issue is that very big files take wayyyyy longer to be analyzed)

🙁 Actual behavior

The issue is that the compilation time of some very large files (22k lines) has increased significantly between v5.0 and v5.1 (and is still very long in the latest 5.6 release)

The file I'm trying to compile is 22k lines long.

Compilation time in v5.0: 6s.
Compilation time in v5.1: 110s.

This is a 18x increase.

I generated trace files but I don't know how to interpret them.

Tracefile for 5.0: traceDir_5.0.log
Tracefile for 5.1: traceDir_5.1.log

🙂 Expected behavior

The analysis time would not greatly differ between 5.0 and recent releases.

Additional information about the issue

The file that is suddenly taking very long to analyze was generated using ts-proto.

I could perfectly disable the analysis for this file (since it was autogenerated) but there is probably an underlying issue.

For the record, the original file comes from the WorkAdventure project (https://github.com/workadventure/workadventure)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Not a DefectThis behavior is one of several equally-correct options

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions