Skip to content

Don't allocate empty slice for named members #1312

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 1 commit into
base: main
Choose a base branch
from

Conversation

jakebailey
Copy link
Member

This shaves off a few allocs in vscode.

@Copilot Copilot AI review requested due to automatic review settings June 28, 2025 22:48
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR optimizes the memory allocation in the checker by returning nil instead of allocating an empty slice for named members.

  • Return nil when the members map is empty.
  • Reduce unnecessary memory allocation in getNamedMembers function.
Comments suppressed due to low confidence (1)

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.

1 participant