Skip to content

[Fusion] Stripe path segment pool per CPU core - #10025

Merged
michaelstaib merged 4 commits into
mainfrom
perf/path-segment-pool-striping
Jul 1, 2026
Merged

michaelstaib merged 4 commits into
mainfrom
perf/path-segment-pool-striping

Conversation

@michaelstaib

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings July 1, 2026 10:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 aims to reduce contention in Fusion’s JSON path-building by changing PathSegmentMemory from a single shared PathSegmentPool to a striped set of pools, intended to spread concurrent Rent/Return activity across multiple locks. It also updates repo ignores for local perf artifacts.

Changes:

  • Replace the single global PathSegmentPool with a stripe-per-worker selection mechanism and per-stripe pool initialization.
  • Add a Reconfigure implementation that recreates the striped pools via a factory.
  • Ignore .perf artifacts via .gitignore.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/PathSegmentMemory.cs Introduces striped pool creation/selection and updates reconfiguration to work with multiple pools.
.gitignore Adds .perf to ignored paths.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Jul 1, 2026 •

Copy link
Copy Markdown
Contributor

Patch coverage

85.0% of changed lines covered (136/160)

File Covered Changed Patch %
…/Fusion/src/Fusion.Execution/Text/Json/PathSegmentPool.cs 69 93 74.2% 🔴
…/Execution/Results/FetchResultStore.Pooling.cs 1 1 100.0% 🟢
…/src/Fusion.Execution/Text/Json/PathSegmentLocalPool.cs 6 6 100.0% 🟢
…/Fusion/src/Fusion.Execution/Text/Json/PathSegmentMemory.cs 60 60 100.0% 🟢
Uncovered changed lines (JSON)
{
  "sha": "a6c996d611c2a316e05d4a28cd1feeb86537805b",
  "files": [
    { "path": "src/HotChocolate/Fusion/src/Fusion.Execution/Text/Json/PathSegmentPool.cs", "ranges": [[111, 112], [114, 116], [118, 120], [123, 123], [125, 128], [130, 131], [285, 285], [306, 307], [347, 348], [355, 356], [387, 388]] }
  ]
}

Project coverage: 52.5% (217170/413351 lines)

@michaelstaib
michaelstaib merged commit 24568fd into main Jul 1, 2026
7 of 8 checks passed
@michaelstaib
michaelstaib deleted the perf/path-segment-pool-striping branch July 1, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants