René's URL Explorer Experiment


Title: Reduce calculation for fragments in ExecutableNormalizedOperation by dondonz · Pull Request #2911 · graphql-java/graphql-java · GitHub

Open Graph Title: Reduce calculation for fragments in ExecutableNormalizedOperation by dondonz · Pull Request #2911 · graphql-java/graphql-java

X Title: Reduce calculation for fragments in ExecutableNormalizedOperation by dondonz · Pull Request #2911 · graphql-java/graphql-java

Description: After parsing and validating an incoming GraphQL operation, the engine creates a normalized version of that operation, the ExecutableNormalizedOperation. For fragments, there is a little more work involved to determine the possible types. Inside narrowDownPossibleObjects, there is a set intersection between the current set of possible objects and the set of types from the resolved type condition. This set intersection can be expensive for very large queries with hundreds of fragments. This PR includes one such example. In almost every case in the example query, one of the sets being compared only has one member. For example, the resolved types set often has only 1 member, because an inline fragment on a concrete type has only one possible type. It would be equivalent, and much cheaper, to calculate via Set contains rather than intersection. And I've added a more general tweak to always pass the smallest set first to Guava's Sets.intersection. The implementation is faster when the first set is smaller. Benchmark results Baseline Benchmark Mode Cnt Score Error Units NQExtraLargeBenchmark.benchMarkThroughput thrpt 9 274.744 ± 14.909 ops/s NQExtraLargeBenchmark.benchMarkAvgTime avgt 9 3.658 ± 0.310 ms/op Optimised Benchmark Mode Cnt Score Error Units NQExtraLargeBenchmark.benchMarkThroughput thrpt 9 333.346 ± 25.986 ops/s NQExtraLargeBenchmark.benchMarkAvgTime avgt 9 2.905 ± 0.124 ms/op Note: For throughput, a higher number is better. For average time, a lower number is better.

Open Graph Description: After parsing and validating an incoming GraphQL operation, the engine creates a normalized version of that operation, the ExecutableNormalizedOperation. For fragments, there is a little more work ...

X Description: After parsing and validating an incoming GraphQL operation, the engine creates a normalized version of that operation, the ExecutableNormalizedOperation. For fragments, there is a little more work ...

Opengraph URL: https://github.com/graphql-java/graphql-java/pull/2911

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:64f72978-4eea-a661-1011-5ffe22e67210
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDE80:3F6476:288F86:35C5B3:6A5FEDA8
html-safe-nonce54907d0864cdd6fb06aed5010f316644da44dc72be9e5206cf2f3448a9137966
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTgwOjNGNjQ3NjoyODhGODY6MzVDNUIzOjZBNUZFREE4IiwidmlzaXRvcl9pZCI6IjM3MTYwNTU3ODU2MDI1NDMwMTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc1668051178b6bf3076a13da61e705fc3f982683eb332e00d8e6954219114e39
hovercard-subject-tagpull_request:1017160884
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/graphql-java/graphql-java/pull/2911/files
twitter:imagehttps://avatars.githubusercontent.com/u/13839920?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/13839920?s=400&v=4
og:image:altAfter parsing and validating an incoming GraphQL operation, the engine creates a normalized version of that operation, the ExecutableNormalizedOperation. For fragments, there is a little more work ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneba296ecd3a3521238fe43b3b3b08cc09207ddc21173e16ee656db03803de8e2b
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/graphql-java/graphql-java git https://github.com/graphql-java/graphql-java.git
octolytics-dimension-user_id14289921
octolytics-dimension-user_logingraphql-java
octolytics-dimension-repository_id38602457
octolytics-dimension-repository_nwographql-java/graphql-java
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id38602457
octolytics-dimension-repository_network_root_nwographql-java/graphql-java
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release6e50fb37e29e4aa0df6386cb485e58b0e3ca97ab
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/graphql-java/graphql-java/pull/2911/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fpull%2F2911%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
Code QualityEnforce quality at mergehttps://github.com/features/code-quality
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-java%2Fgraphql-java%2Fpull%2F2911%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=graphql-java%2Fgraphql-java
Reloadhttps://github.com/graphql-java/graphql-java/pull/2911/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/2911/files
Reloadhttps://github.com/graphql-java/graphql-java/pull/2911/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/2911/files
graphql-java https://github.com/graphql-java
graphql-javahttps://github.com/graphql-java/graphql-java
Notifications https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Fork 1.1k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Star 6.2k https://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java
Code https://github.com/graphql-java/graphql-java
Issues 26 https://github.com/graphql-java/graphql-java/issues
Pull requests 12 https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality 0 https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
Code https://github.com/graphql-java/graphql-java
Issues https://github.com/graphql-java/graphql-java/issues
Pull requests https://github.com/graphql-java/graphql-java/pulls
Discussions https://github.com/graphql-java/graphql-java/discussions
Actions https://github.com/graphql-java/graphql-java/actions
Projects https://github.com/graphql-java/graphql-java/projects
Wiki https://github.com/graphql-java/graphql-java/wiki
Security and quality https://github.com/graphql-java/graphql-java/security
Insights https://github.com/graphql-java/graphql-java/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgraphql-java%2Fgraphql-java%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgraphql-java%2Fgraphql-java%2Fissues%2Fnew%2Fchoose
dondonzhttps://github.com/dondonz
masterhttps://github.com/graphql-java/graphql-java/tree/master
benchmark_enfhttps://github.com/graphql-java/graphql-java/tree/benchmark_enf
Conversation 5 https://github.com/graphql-java/graphql-java/pull/2911
Commits 4 https://github.com/graphql-java/graphql-java/pull/2911/commits
Checks 0 https://github.com/graphql-java/graphql-java/pull/2911/checks
Files changed https://github.com/graphql-java/graphql-java/pull/2911/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/2911/files
Reduce calculation for fragments in ExecutableNormalizedOperation https://github.com/graphql-java/graphql-java/pull/2911/files#top
Show all changes 4 commits https://github.com/graphql-java/graphql-java/pull/2911/files
4256831 Cheaper calculation for narrowing down possible objects in ENO dondonz Aug 4, 2022 https://github.com/graphql-java/graphql-java/pull/2911/commits/4256831503a735a83e060475e6d91fe5b45eb8e5
b710226 Add smaller set first optimisation dondonz Aug 8, 2022 https://github.com/graphql-java/graphql-java/pull/2911/commits/b710226f0a7bd73a7d5f8b01fe4674e6febddd04
dbc0476 Merge branch 'master' into benchmark_enf dondonz Aug 10, 2022 https://github.com/graphql-java/graphql-java/pull/2911/commits/dbc0476882e990332f01645ee14288398a109ae2
9f8aaed Added test fore intersection bbakerman Aug 11, 2022 https://github.com/graphql-java/graphql-java/pull/2911/commits/9f8aaedd7448ac6e84e938fdc5845bf7585fe63c
Clear filters https://github.com/graphql-java/graphql-java/pull/2911/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/2911/files
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/2911/files
ExecutableNormalizedOperationFactory.java https://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
FpKit.java https://github.com/graphql-java/graphql-java/pull/2911/files#diff-0e0a8a2e8e1631ba7b7092664122baeae05e628c5ce5b384508f7ba3e262e335
FpKitTest.groovy https://github.com/graphql-java/graphql-java/pull/2911/files#diff-d6260b5eac0bf3f6f017623311526e47dedc983f9b3c1cfd3327af529c1b7e44
NQExtraLargeBenchmark.java https://github.com/graphql-java/graphql-java/pull/2911/files#diff-fce2d3dffc701922d30e2915d60cb004dface5e2763d18336fd47d4ab91564ec
extra-large-schema-1-query.graphql https://github.com/graphql-java/graphql-java/pull/2911/files#diff-c6dff4a295fc41c93e66e298e527f2bcdfbf2117d2dbfc07d0ec50121e787ea3
extra-large-schema-1.graphqls https://github.com/graphql-java/graphql-java/pull/2911/files#diff-dbf8cb02d0660b9f308807bbfbd89c592990a68ba24f75d0dee2a40dc1c4b445
src/main/java/graphql/normalized/ExecutableNormalizedOperationFactory.javahttps://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
View file https://github.com/graphql-java/graphql-java/blob/9f8aaedd7448ac6e84e938fdc5845bf7585fe63c/src/main/java/graphql/normalized/ExecutableNormalizedOperationFactory.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/2911/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-bf3024903ff6a5d36bb272a46871c020203c9af4d449d14dd2c6ef1784e97af3
src/main/java/graphql/util/FpKit.javahttps://github.com/graphql-java/graphql-java/pull/2911/files#diff-0e0a8a2e8e1631ba7b7092664122baeae05e628c5ce5b384508f7ba3e262e335
View file https://github.com/graphql-java/graphql-java/blob/9f8aaedd7448ac6e84e938fdc5845bf7585fe63c/src/main/java/graphql/util/FpKit.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/2911/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-0e0a8a2e8e1631ba7b7092664122baeae05e628c5ce5b384508f7ba3e262e335
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-0e0a8a2e8e1631ba7b7092664122baeae05e628c5ce5b384508f7ba3e262e335
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-0e0a8a2e8e1631ba7b7092664122baeae05e628c5ce5b384508f7ba3e262e335
bbakermanhttps://github.com/bbakerman
Aug 10, 2022https://github.com/graphql-java/graphql-java/pull/2911/files#r941911274
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/2911/files
src/test/groovy/graphql/util/FpKitTest.groovyhttps://github.com/graphql-java/graphql-java/pull/2911/files#diff-d6260b5eac0bf3f6f017623311526e47dedc983f9b3c1cfd3327af529c1b7e44
View file https://github.com/graphql-java/graphql-java/blob/9f8aaedd7448ac6e84e938fdc5845bf7585fe63c/src/test/groovy/graphql/util/FpKitTest.groovy
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/2911/{{ revealButtonHref }}
https://github.com/graphql-java/graphql-java/pull/2911/files#diff-d6260b5eac0bf3f6f017623311526e47dedc983f9b3c1cfd3327af529c1b7e44
src/test/java/benchmark/NQExtraLargeBenchmark.javahttps://github.com/graphql-java/graphql-java/pull/2911/files#diff-fce2d3dffc701922d30e2915d60cb004dface5e2763d18336fd47d4ab91564ec
View file https://github.com/graphql-java/graphql-java/blob/9f8aaedd7448ac6e84e938fdc5845bf7585fe63c/src/test/java/benchmark/NQExtraLargeBenchmark.java
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/graphql-java/graphql-java/pull/2911/{{ revealButtonHref }}
Please reload this pagehttps://github.com/graphql-java/graphql-java/pull/2911/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.