Skip to content

Eliminate duplicates and improve performance #81744

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
wants to merge 2 commits into
base: canary
Choose a base branch
from

Conversation

suwakei
Copy link

@suwakei suwakei commented Jul 17, 2025

Proposal:

1. Add .vscode to the allow list

Currently, IntelliJ IDEA’s .idea directories and .iml files are already excluded from conflict checks.
Similarly, Visual Studio Code (VS Code) is widely used, and .vscode directories are commonly present in project folders.

Adding .vscode to the allow list would improve the developer experience for VS Code users,
especially when using tools like create-next-app within existing project folders.

2. Use Set for performance and clarity

The current implementation uses an array (Array) and checks file inclusion with Array.prototype.includes().
Replacing this with a Set and using Set.prototype.has() offers two key advantages:

  • Performance: Set.has() is generally faster than Array.includes() (O(1) vs O(n)). While the list is currently small, this is a good practice for scalability.
  • Readability and semantic clarity: A Set clearly represents a unique collection of values, aligning with the goal of checking for duplicates.

These improvements help make the codebase more robust and user-friendly.

@ijjk ijjk added the create-next-app Related to our CLI tool for quickly starting a new Next.js application. label Jul 17, 2025
@ijjk
Copy link
Member

ijjk commented Jul 17, 2025

Allow CI Workflow Run

  • approve CI run for commit: e430fd7

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-next-app Related to our CLI tool for quickly starting a new Next.js application.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants