Skip to content

Improve Utf8GraphQLParser and Utf8Helper performance#9134

Merged
michaelstaib merged 2 commits intomainfrom
mst/parser-perf
Feb 18, 2026
Merged

Improve Utf8GraphQLParser and Utf8Helper performance#9134
michaelstaib merged 2 commits intomainfrom
mst/parser-perf

Conversation

@michaelstaib
Copy link
Copy Markdown
Member

  • Add first-byte keyword dispatch in ParseDefinition and ParseTypeExtension
  • Add ParseOperationDefinition(OperationType) overload to skip redundant matching
  • Add empty list singletons for ParseImplementsInterfaces and ParseUnionMemberTypes
  • Add list capacity hints for definitions, selections, arguments, and values
  • Replace HexToDecimal switch with byte[256] lookup table
  • Split ProcessEscapeSequence into inlined hot path and NoInlining cold path
  • Change SIMD V256/V128 from else-if to sequential for V128 remainder processing
  • Replace byte-by-byte scalar tail with IndexOf + CopyTo bulk copy
  • Add well-known name interning in GetName() for ~35 common GraphQL names
  • Add parser and unescape benchmarks

@michaelstaib michaelstaib changed the title Improved Utf8GraphQLParser and Utf8Helper performance Improve Utf8GraphQLParser and Utf8Helper performance Feb 18, 2026
@michaelstaib michaelstaib merged commit 5594b78 into main Feb 18, 2026
6 checks passed
@michaelstaib michaelstaib deleted the mst/parser-perf branch February 18, 2026 13:13
@github-actions
Copy link
Copy Markdown
Contributor

Fusion Gateway Performance Results

Simple Composite Query

Req/s Err%
Constant (50 VUs) 2930.15 0.00%
Ramping (0-500-0 VUs) 3170.62 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.72ms 15.06ms 16.83ms 30.50ms 35.64ms 172.37ms
Ramping 0.81ms 69.04ms 70.20ms 131.29ms 148.49ms 253.44ms
query TestQuery {
  topProducts(first: 5) {
    inStock
    name
    price
    shippingEstimate
    upc
    weight
    reviews {
      id
      body
      author {
        id
        username
        name
      }
    }
  }
}

Deep Recursion Query

Req/s Err%
Constant (50 VUs) 741.33 0.00%
Ramping (0-500-0 VUs) 824.74 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 9.02ms 62.53ms 65.90ms 81.46ms 90.72ms 342.37ms
Ramping 1.82ms 253.48ms 261.33ms 527.75ms 565.67ms 698.34ms
query TestQuery {
  users {
    id
    username
    name
    reviews {
      id
      body
      product {
        inStock
        name
        price
        shippingEstimate
        upc
        weight
        reviews {
          id
          body
          author {
            id
            username
            name
            reviews {
              id
              body
              product {
                inStock
                name
                price
                shippingEstimate
                upc
                weight
              }
            }
          }
        }
      }
    }
  }
  topProducts(first: 5) {
    inStock
    name
    price
    shippingEstimate
    upc
    weight
    reviews {
      id
      body
      author {
        id
        username
        name
        reviews {
          id
          body
          product {
            inStock
            name
            price
            shippingEstimate
            upc
            weight
          }
        }
      }
    }
  }
}

Variable Batching Throughput

Req/s Err%
Constant (50 VUs) 23265.72 0.00%
Ramping (0-500-0 VUs) 18488.74 0.00%
Response Times & Query
Min Med Avg P90 P95 Max
Constant 0.10ms 1.74ms 2.10ms 4.00ms 4.86ms 46.34ms
Ramping 0.10ms 9.51ms 11.43ms 23.28ms 28.09ms 99.24ms
query TestQuery($upc: ID!, $price: Long!, $weight: Long!) {
  productByUpc(upc: $upc) {
    inStock
    shippingEstimate(weight: $weight, price: $price)
  }
}

Variables (5 sets batched per request)

[
  { "upc": "1", "price": 899, "weight": 100 },
  { "upc": "2", "price": 1299, "weight": 1000 },
  { "upc": "3", "price": 15, "weight": 20 },
  { "upc": "4", "price": 499, "weight": 100 },
  { "upc": "5", "price": 1299, "weight": 1000 }
]

Run 22141176141 • Commit b473e1b • Wed, 18 Feb 2026 13:54:39 GMT

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (6a3b7a3) to head (094ff36).
⚠️ Report is 769 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #9134       +/-   ##
==========================================
- Coverage   74.16%       0   -74.17%     
==========================================
  Files        2677       0     -2677     
  Lines      140790       0   -140790     
  Branches    16371       0    -16371     
==========================================
- Hits       104421       0   -104421     
+ Misses      30774       0    -30774     
+ Partials     5595       0     -5595     
Flag Coverage Δ
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant