GraphQLSwift / GraphQL

The Swift GraphQL implementation for macOS and Linux
MIT License
938 stars 72 forks source link

Optimizes parsing of large non-UTF8 queries #112

Closed NeedleInAJayStack closed 1 year ago

NeedleInAJayStack commented 1 year ago

While this doesn't impact UTF8 strings built up in Swift, Strings decoded from data (like through Vapor, for example) may not be marked as UTF8, which makes the lexer UTF8 conversions very expensive. In evaluation of 450kb requests, performance improved from 27min to 5sec with this adjustment.

NeedleInAJayStack commented 1 year ago

Hey @paulofaria, do you have any concerns about this one? It should be a quick review.

NeedleInAJayStack commented 1 year ago

No worries, thanks for the review!