Skip to content

Performance: forcefully disable some compiler flags #11241

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

Open
4 tasks done
43081j opened this issue May 22, 2025 · 2 comments
Open
4 tasks done

Performance: forcefully disable some compiler flags #11241

43081j opened this issue May 22, 2025 · 2 comments
Labels
awaiting response Issues waiting for a reply from the OP or another party enhancement New feature or request performance Issues regarding performance

Comments

@43081j
Copy link
Contributor

43081j commented May 22, 2025

Before You File a Proposal Please Confirm You Have Done The Following...

Relevant Package

tsconfig-utils

My proposal is suitable for this project

  • I believe my proposal would be useful to the broader TypeScript community (meaning it is not a niche proposal).

Description

We already have a default set of core compiler options here:

export const CORE_COMPILER_OPTIONS = {
// Required to avoid parse from causing emit to occur
noEmit: true,
// Flags required to make no-unused-vars work
noUnusedLocals: true,
noUnusedParameters: true,
} satisfies ts.CompilerOptions;

afaict, these override the user's project compiler options.

while doing some reading through a CPU profile of a lint run, i noticed a significant amount of time is spent ensuring file names are correct when forceConsistentCasingInFileNames: true.

in the repo I was using, hacking this into CORE_COMPILER_OPTIONS as false made the test run speed up from 1m20s to 1m. i ran it a few times, and the times did vary but always had a significant improvement.

so suggestion number 1: force forceConsistentCasingInFileNames: false since we don't really care when linting.

suggestion/idea number 2: maybe this isn't the only setting? maybe there are others doing unnecessary checks we don't really care for in lint runs (typescript's own lint/strict checking, etc)

Additional Info

No response

@43081j 43081j added enhancement New feature or request triage Waiting for team members to take a look labels May 22, 2025
@JoshuaKGoldberg
Copy link
Member

This sounds great! Do you have time to you post a way for us to reproduce the findings? I'm about to be out for a couple of weeks and we've all been pretty slammed.

https://github.com/typescript-eslint/performance might be a good start if you want one.

@JoshuaKGoldberg JoshuaKGoldberg added awaiting response Issues waiting for a reply from the OP or another party performance Issues regarding performance labels May 23, 2025
@jakebailey
Copy link
Collaborator

I think I'd really like to get to the bottom of this before turning it off; that would help everyone and also, I could have sworn we were going to deprecate forceConsistentCasingInFileNames and make it be true for everyone (but now cannot find that).

@bradzacher bradzacher removed the triage Waiting for team members to take a look label May 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting response Issues waiting for a reply from the OP or another party enhancement New feature or request performance Issues regarding performance
Projects
None yet
Development

No branches or pull requests

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy