René's URL Explorer Experiment


Title: Speed up LexicalDistance.measure used for "Did you mean" suggestions · Issue #314 · graphql-python/graphql-core · GitHub

Open Graph Title: Speed up LexicalDistance.measure used for "Did you mean" suggestions · Issue #314 · graphql-python/graphql-core

X Title: Speed up LexicalDistance.measure used for "Did you mean" suggestions · Issue #314 · graphql-python/graphql-core

Description: Problem suggestion_list() calls LexicalDistance.measure() once for each option. When a query has a typo, validation uses this to build "Did you mean ...?" hints. On large schemas, this distance code takes most of the validation time. The...

Open Graph Description: Problem suggestion_list() calls LexicalDistance.measure() once for each option. When a query has a typo, validation uses this to build "Did you mean ...?" hints. On large schemas, this distance cod...

X Description: Problem suggestion_list() calls LexicalDistance.measure() once for each option. When a query has a typo, validation uses this to build "Did you mean ...?" hints. On large schemas, this di...

Opengraph URL: https://github.com/graphql-python/graphql-core/issues/314

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Speed up LexicalDistance.measure used for \"Did you mean\" suggestions","articleBody":"## Problem\n\n`suggestion_list()` calls `LexicalDistance.measure()` once for each option. When a query has a typo, validation uses this to build \"Did you mean ...?\" hints. On large schemas, this distance code takes most of the validation time.\n\nThe method does extra work for each option:\n\n- It builds the full distance table even when a shared prefix or suffix needs no edits.\n- It builds the table even when the option has more missing characters than the threshold allows.\n- It calls `min()` with three values in every cell, even when the two characters are equal.\n- It converts the option to a list of code points on every call.\n\n## Numbers\n\nPython 3.12 on Linux. The Before column is the current `main`, and the After column is the proposed change.\n\n| Situation | Before | After | Change |\n| --- | --- | --- | --- |\n| `tests/benchmarks/test_validate_invalid_gql.py` (median) | 22.49 ms | 11.42 ms | 49% faster |\n| `suggestion_list`, 12-char typo, 2000 random names | 27.04 ms | 2.69 ms | 90% faster |\n| `suggestion_list`, 4-char typo, 2000 random names | 2.28 ms | 0.61 ms | 73% faster |\n| `suggestion_list`, 30-char input, 2000 random names | 0.70 ms | 0.30 ms | 58% faster |\n| Exact or case-only matches, 2000 options | 0.170 ms | 0.179 ms | about the same (early return, code unchanged) |\n\n## Proposed fix\n\nSkip the common prefix and suffix, and return early when too many characters are missing. In the table, copy the diagonal cell for equal characters, and rotate the row buffers.\n\n## Environment\n\ngraphql-core `main` (1d505c1), CPython 3.12, Linux x86_64.\n","author":{"url":"https://github.com/dexhunter","@type":"Person","name":"dexhunter"},"datePublished":"2026-11-08T04:26:22Z","url":"https://github.com/graphql-python/graphql-core/issues/314"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:e2c4ef07-f70f-b93a-cc70-a15bc7f351f8
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idA624:18E7F5:1071942:158AC0D:6B00067C
html-safe-noncea518f2a12a1a31c0c507f5398e1ce93a215163266a9c2e9eb1c2c382fe8cf0f0
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjI0OjE4RTdGNToxMDcxOTQyOjE1OEFDMEQ6NkIwMDA2N0MiLCJ2aXNpdG9yX2lkIjoiOTE5MTMyOTQ1MjMxODAwMDc2NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmace7ff6b016b86f253818ab81c6e1f27f0f7c934f27398a2ed7f89bca0d2fe73cc
hovercard-subject-tagissue:6267565988
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/graphql-python/graphql-core/314/issue_layout
twitter:imagehttps://opengraph.githubassets.com/f2af4503e1dd57fa3857fe9f6396d695d73c31021ccab38721789d714207816a/graphql-python/graphql-core/issues/314
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/f2af4503e1dd57fa3857fe9f6396d695d73c31021ccab38721789d714207816a/graphql-python/graphql-core/issues/314
og:image:altProblem suggestion_list() calls LexicalDistance.measure() once for each option. When a query has a typo, validation uses this to build "Did you mean ...?" hints. On large schemas, this distance cod...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamedexhunter
hostnamegithub.com
expected-hostnamegithub.com
None0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729
turbo-cache-controlno-preview
go-importgithub.com/graphql-python/graphql-core git https://github.com/graphql-python/graphql-core.git
octolytics-dimension-user_id15002022
octolytics-dimension-user_logingraphql-python
octolytics-dimension-repository_id143207933
octolytics-dimension-repository_nwographql-python/graphql-core
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143207933
octolytics-dimension-repository_network_root_nwographql-python/graphql-core
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release16a11879678aaf97e2a42c33ee70830aa084fa37
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/graphql-python/graphql-core/issues/314#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-python%2Fgraphql-core%2Fissues%2F314
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgraphql-python%2Fgraphql-core%2Fissues%2F314
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=graphql-python%2Fgraphql-core
Reloadhttps://github.com/graphql-python/graphql-core/issues/314
Reloadhttps://github.com/graphql-python/graphql-core/issues/314
Reloadhttps://github.com/graphql-python/graphql-core/issues/314
graphql-pythonhttps://github.com/graphql-python
graphql-corehttps://github.com/graphql-python/graphql-core
Codehttps://github.com/graphql-python/graphql-core
Issues24 (24)https://github.com/graphql-python/graphql-core/issues
Pull requests3 (3)https://github.com/graphql-python/graphql-core/pulls
Actionshttps://github.com/graphql-python/graphql-core/actions
Projectshttps://github.com/graphql-python/graphql-core/projects
Security and quality3 (3)https://github.com/graphql-python/graphql-core/security
Insightshttps://github.com/graphql-python/graphql-core/insights
https://github.com/graphql-python/graphql-core
New issuehttps://github.com/login?return_to=https://github.com/graphql-python/graphql-core/issues/314
New issuehttps://github.com/login?return_to=https://github.com/graphql-python/graphql-core/issues/314
Speed up LexicalDistance.measure used for "Did you mean" suggestionshttps://github.com/graphql-python/graphql-core/issues/314#top
https://github.com/dexhunter
dexhunterhttps://github.com/dexhunter
on Nov 8, 2026https://github.com/graphql-python/graphql-core/issues/314#issue-6267565988
1d505c1https://github.com/graphql-python/graphql-core/commit/1d505c19bf5fb8da0205165b78af6094d637009e
https://github.com/Cito
Citohttps://github.com/Cito
on Nov 15, 2026https://github.com/graphql-python/graphql-core/issues/314#issuecomment-6898006941
graphql/graphql-js#4190https://github.com/graphql/graphql-js/issues/4190
0c26e58https://github.com/graphql-python/graphql-core/commit/0c26e582ccbde4192cf82bcf224d0540051835e4
https://github.com/dexhunter
dexhunterhttps://github.com/dexhunter
on Nov 15, 2026https://github.com/graphql-python/graphql-core/issues/314#issuecomment-6898598411
diff for 0c26e582https://github.com/graphql-python/graphql-core/commit/0c26e582ccbde4192cf82bcf224d0540051835e4
Sign up for freehttps://github.com/signup?return_to=https://github.com/graphql-python/graphql-core/issues/314
Sign in to commenthttps://github.com/login?return_to=https://github.com/graphql-python/graphql-core/issues/314
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.