Skip to content

builder.getDeclarationDiagnostics performance regression since 5.6 #60970

Open
@alan-agius4

Description

@alan-agius4

🔎 Search Terms

Starting with version 5.6, the builder.getDeclarationDiagnostics method has become slower when invoked to retrieve diagnostics for a single SourceFile.

Here are the timing comparisons:

TypeScript Version: 5.5.2

  • builder.getDeclarationDiagnostics(): 2.247s
  • builder.getDeclarationDiagnostics(builder.getSourceFiles()[0]): 0.19ms
  • builder.getSourceFiles().forEach(sf => builder.getDeclarationDiagnostics(sf)): 1.655s

TypeScript Version: 5.7.2

  • builder.getDeclarationDiagnostics(): 1.675s
  • builder.getDeclarationDiagnostics(builder.getSourceFiles()[0]): 1.791s
  • builder.getSourceFiles().forEach(sf => builder.getDeclarationDiagnostics(sf)): 2.824s

🕗 Version & Regression Information

💻 Code

https://github.com/alan-agius4/ts-getDeclarationDiagnostics

🙁 Actual behavior

Regression in performance

🙂 Expected behavior

Similar performance

Additional information about the issue

No response

Metadata

Metadata

Assignees

Labels

Needs InvestigationThis issue needs a team member to investigate its status.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions