Skip to content
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.

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

Investigate Wildcard Matching Performance #59058

Open
DanielRosenwasser opened this issue Jun 27, 2024 · 2 comments
Open

Investigate Wildcard Matching Performance #59058

DanielRosenwasser opened this issue Jun 27, 2024 · 2 comments
Labels
Domain: Performance Reports of unusually slow behavior Suggestion An idea for TypeScript

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jun 27, 2024

Recently I investigated optimizing path matching in #59048 since an internal project had over 5500 path mapping entries.

@dmichon-msft brought up a similar issue they had with a project where using wildcard entries in include caused a 14 second slowdown in their builds. Some of the same optimizations might be usable in include/exclude globbing, or we could adapt a different solution with a radix tree or a similar data structure (e.g. https://github.com/microsoft/rushstack/blob/1bf90f890d59de5babaf07ccc2551b77df704b18/libraries/rush-lib/src/logic/LookupByPath.ts as pointed out at #59048 (comment)).

@DanielRosenwasser DanielRosenwasser added Domain: Performance Reports of unusually slow behavior Suggestion An idea for TypeScript labels Jun 27, 2024
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 5.6.0 milestone Jun 27, 2024
@dmichon-msft
Copy link
Contributor

Note that the performance issues were last checked in version 5.3.3 for include (exclude doesn't have a performance issue because it is already order-independent). The time was previously spent in the visitDirectory function.

The scenario being tested involved a project with ~750 single-file include patterns.

@fatcerberus
Copy link

5500 path mapping entries

😱 what is this I don’t even

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Domain: Performance Reports of unusually slow behavior Suggestion An idea for TypeScript
Projects
None yet
Development

No branches or pull requests

3 participants