-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Improve
parse
performance (#25)
* Combine value matchers into single regex match * Refactor object/list parser into leading loop * Turn arguments parsing into leading loop * Tweak type parsing implementation * Reformat variableDefinitions parsing * Refactor selectionSet parsing to merge branches * Pull out start of selections in parsing branches * Remove redundant length checks * Merge variable name into value parser * Merge float part into main regex * Absorb object/list parsing into value parser * Merge field parsing into selectionSet parser * Squash away typeCondition parser * Merge fragmentSpread into selectionSet parser * Remove redundant arrays in operation definitions * Extract OperationType matching to document parser * Avoid allocating variableDefinitions array as possible * Avoid allocating directives if possible * Avoid allocating arguments array if possible * Remove name() helper * Remove redundant ignore() calls * Add changeset * Remove redundant import * Add mising tests and remove redundant branches * Update comments * Add additional tests * Remove recursion from type() parser
- Loading branch information
Showing
5 changed files
with
507 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@0no-co/graphql.web': patch | ||
--- | ||
|
||
Improve parser performance. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ dist/ | |
coverage/ | ||
package-lock.json | ||
.DS_Store | ||
tsconfig.vitest-temp.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.