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

Fix hot path string allocations from ProjectKey #10138

Merged
merged 2 commits into from
Mar 21, 2024

Commits on Mar 21, 2024

  1. Fix hot path string allocations from ProjectKey

    @ToddGrun pointed me to a fair amount of string allocation due `ProjectKey.From(Project)` being called repeatedly on a hot path. To address this, I've added `ProjectKey.Matches(Project)`, which simply compares the current key's `Id` with the project's intermediate output path. This uses a new `FilePathNormalizer.AreDirectoryPathsEquivalent(...)` helper to avoid allocating a new string.
    DustinCampbell committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    56d8abb View commit details
    Browse the repository at this point in the history
  2. Add comment and assert

    DustinCampbell committed Mar 21, 2024
    Configuration menu
    Copy the full SHA
    cec11f4 View commit details
    Browse the repository at this point in the history