Skip to content

Perf/skip redundant config resolution - #4010

Open
HanCong03 wants to merge 2 commits into
prettier:mainfrom
HanCong03:perf/skip-redundant-config-resolution
Open

HanCong03 wants to merge 2 commits into
prettier:mainfrom
HanCong03:perf/skip-redundant-config-resolution

Conversation

@HanCong03

@HanCong03 HanCong03 commented Sep 4, 2026 •

Copy link
Copy Markdown

Description

Even when prettier.configPath is explicitly set, the extension still performs automatic config discovery before resolving the specified file.

Since the user-specified config takes precedence, any automatically discovered files are effectively ignored. This introduces unnecessary filesystem lookups and config resolution overhead, significantly degrading formatting performance.

Related Issue

Closes #4009

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring (no functional changes)
  • CI/Build changes

Checklist

  • I have read the CONTRIBUTING guidelines
  • My code follows the code style of this project (npm run lint passes)
  • I have run npm run prettier to format my code
  • I have added/updated tests that prove my fix or feature works
  • All new and existing tests pass (npm test)
  • I have updated the CHANGELOG.md with a summary of my changes

Avoid probing for auto-discovered Prettier config files when
prettier.configPath is explicitly configured, while preserving
custom config resolution and requireConfig behavior.

Signed-off-by: hancong03 <hancong03@qq.com>
Upgrade VS Code test CLI and Electron runner to support the renamed macOS VS Code executable.

Signed-off-by: hancong03 <hancong03@qq.com>
@HanCong03

Copy link
Copy Markdown
Author

@ntotten @fisker Could you please review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Performance: unnecessary config discovery when prettier.configPath is explicitly specified

1 participant