René's URL Explorer Experiment


Title: Faster cache deserialization · Issue #3456 · python/mypy · GitHub

Open Graph Title: Faster cache deserialization · Issue #3456 · python/mypy

X Title: Faster cache deserialization · Issue #3456 · python/mypy

Description: Deserialization of cache files is a major bottleneck in incremental mode, so any performance improvements there would be valuable. At least @pkch has previously worked on this, and it's unclear if any significant wins are achievable with...

Open Graph Description: Deserialization of cache files is a major bottleneck in incremental mode, so any performance improvements there would be valuable. At least @pkch has previously worked on this, and it's unclear if ...

X Description: Deserialization of cache files is a major bottleneck in incremental mode, so any performance improvements there would be valuable. At least @pkch has previously worked on this, and it's unclear...

Opengraph URL: https://github.com/python/mypy/issues/3456

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Faster cache deserialization","articleBody":"Deserialization of cache files is a major bottleneck in incremental mode, so any performance improvements there would be valuable. \r\n\r\nAt least @pkch has previously worked on this, and it's unclear if any significant wins are achievable without a lot of work. However, there seem to be some redundant information in the cache files that we haven't looked at eliminating yet. \r\n\r\nHere are some random ideas:\r\n\r\n* Use shared type objects at least for common types such as `int` and `str`.\r\n* Don't include default attribute values for the most common AST nodes. For example, we could have `\"defaults\": true` to mark that we can skip processing non-default values altogether.\r\n* Use shared dummy objects for things like empty function bodies.\r\n* Micro-optimize deserialization of the most common node types.\r\n* Avoid repeating information about arguments in the serialized form of FuncDefs.\r\n\r\nIdea for how to move forward:\r\n\r\n* Run a profiling run when type checking mypy and looks for promising hot spots (spoiler: there probably aren't any major hot spots visible in the profile). Post results here.\r\n* Determine which node types are the most common ones during deserialization. Also calculate cumulative figures and percentages (of all nodes). Post results here.\r\n* Prototype various potential optimizations and benchmark them individually. Note that getting reliable benchmark results is hard because of turbo modes, background processes, etc. I may look at setting up a dedicated system for running benchmarks.\r\n* If speedups from individual optimizations are negligible (under 0.5%) or negative, give up on them and post the negative results here. Otherwise we risk others doing the same experiment in the future.\r\n* If the total speedup from all optimizations would be under, say, 10%, it probably doesn't make sense to land any of them, unless some optimizations are utterly trivial.\r\n\r\nIn any case, this issue isn't important enough to spend a lot of time on it. We have other plans to speed up mypy, but as they will take more effort, so some quick wins here would be nice.","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2017-05-26T16:22:41Z","url":"https://github.com/python/mypy/issues/3456"}

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:ba5ce81b-510e-9f2d-c2f4-278e41562d88
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idAEF6:2573D7:218E702:2DB93E6:6B00255C
html-safe-nonce307119ee0d9e97b7ff3ffbb7aac092f3b312a14db28e410297509914b42bc0f8
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUY2OjI1NzNENzoyMThFNzAyOjJEQjkzRTY6NkIwMDI1NUMiLCJ2aXNpdG9yX2lkIjoiNzczNDAzMDk3NzAxNzU4NzAzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac56d6db9ea9608beafa77b2c011f8363422b18e6262bb0fdd2b1cd67d441de18b
hovercard-subject-tagissue:231673453
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/python/mypy/3456/issue_layout
twitter:imagehttps://opengraph.githubassets.com/24c82917cd5a16416548bbe2fdc6c7eb0688a16f2146d1b68ba83abc8a84a531/python/mypy/issues/3456
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/24c82917cd5a16416548bbe2fdc6c7eb0688a16f2146d1b68ba83abc8a84a531/python/mypy/issues/3456
og:image:altDeserialization of cache files is a major bottleneck in incremental mode, so any performance improvements there would be valuable. At least @pkch has previously worked on this, and it's unclear if ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameJukkaL
hostnamegithub.com
expected-hostnamegithub.com
None4eb4cba0d69f045374ac15de9666d22b0961e1d555cc3824f36b7734c00c78e0
turbo-cache-controlno-preview
go-importgithub.com/python/mypy git https://github.com/python/mypy.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id7053637
octolytics-dimension-repository_nwopython/mypy
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id7053637
octolytics-dimension-repository_network_root_nwopython/mypy
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
release44c658b24abf00491fb7ae5f56d42c9f38cbeab2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/python/mypy/issues/3456#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fmypy%2Fissues%2F3456
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%2Fpython%2Fmypy%2Fissues%2F3456
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=python%2Fmypy
Reloadhttps://github.com/python/mypy/issues/3456
Reloadhttps://github.com/python/mypy/issues/3456
Reloadhttps://github.com/python/mypy/issues/3456
pythonhttps://github.com/python
mypyhttps://github.com/python/mypy
Codehttps://github.com/python/mypy
Issues2.7k (2.7k)https://github.com/python/mypy/issues
Pull requests546 (546)https://github.com/python/mypy/pulls
Actionshttps://github.com/python/mypy/actions
Projectshttps://github.com/python/mypy/projects
Wikihttps://github.com/python/mypy/wiki
Security and qualityhttps://github.com/python/mypy/security
Insightshttps://github.com/python/mypy/insights
https://github.com/python/mypy
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/3456
New issuehttps://github.com/login?return_to=https://github.com/python/mypy/issues/3456
Faster cache deserializationhttps://github.com/python/mypy/issues/3456#top
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
performancehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22performance%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on May 26, 2017https://github.com/python/mypy/issues/3456#issue-231673453
@pkchhttps://github.com/pkch
https://github.com/JelleZijlstra
JelleZijlstrahttps://github.com/JelleZijlstra
on May 26, 2017https://github.com/python/mypy/issues/3456#issuecomment-304336065
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on May 26, 2017https://github.com/python/mypy/issues/3456#issuecomment-304339275
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on May 28, 2017https://github.com/python/mypy/issues/3456#issuecomment-304509106
https://github.com/gvanrossum
gvanrossumhttps://github.com/gvanrossum
on May 28, 2017https://github.com/python/mypy/issues/3456#issuecomment-304532695
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on May 29, 2017https://github.com/python/mypy/issues/3456#issuecomment-304668165
JukkaLhttps://github.com/JukkaL
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
on May 31, 2017https://github.com/python/mypy/issues/3456#event-1103970018
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Sep 5, 2017https://github.com/python/mypy/issues/3456#issuecomment-327201520
JukkaLhttps://github.com/JukkaL
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
priority-0-highhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-0-high%22
on Sep 18, 2017https://github.com/python/mypy/issues/3456#event-1253348505
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Sep 18, 2017https://github.com/python/mypy/issues/3456#issuecomment-330207858
ilevkivskyihttps://github.com/ilevkivskyi
performancehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22performance%22
on May 11, 2019https://github.com/python/mypy/issues/3456#event-2334965552
https://github.com/emmatyping
emmatypinghttps://github.com/emmatyping
on May 12, 2020https://github.com/python/mypy/issues/3456#issuecomment-627118763
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on May 12, 2020https://github.com/python/mypy/issues/3456#issuecomment-627252771
https://github.com/msullivan
msullivanhttps://github.com/msullivan
on May 19, 2020https://github.com/python/mypy/issues/3456#issuecomment-630501607
https://github.com/vharitonsky
vharitonskyhttps://github.com/vharitonsky
on Mar 14, 2023https://github.com/python/mypy/issues/3456#issuecomment-1468656631
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Sep 4, 2023https://github.com/python/mypy/issues/3456#issuecomment-1705550667
#933https://github.com/python/mypy/issues/933
#15731https://github.com/python/mypy/issues/15731
JukkaLhttps://github.com/JukkaL
on Sep 4, 2023https://github.com/python/mypy/issues/3456#event-10276042339
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Jan 30, 2024https://github.com/python/mypy/issues/3456#issuecomment-1916934657
hauntsaninjahttps://github.com/hauntsaninja
on Oct 16, 2024https://github.com/python/mypy/issues/3456#event-14689369429
Use orjson instead of json, when available (#17955)https://github.com/python/mypy/commit/c1f2db34fbec3b8347f9037703a804a4cd427c33
#17955https://github.com/python/mypy/pull/17955
c1f2db3https://github.com/python/mypy/commit/c1f2db34fbec3b8347f9037703a804a4cd427c33
Use orjson instead of json, when available (#17955)https://github.com/python/mypy/commit/7c27808a0be2fc205788a826be83cbb0a68f89e1
#17955https://github.com/python/mypy/pull/17955
7c27808https://github.com/python/mypy/commit/7c27808a0be2fc205788a826be83cbb0a68f89e1
https://github.com/JukkaL
JukkaLhttps://github.com/JukkaL
on Aug 19, 2025https://github.com/python/mypy/issues/3456#issuecomment-3201596988
Force all deserialized objects to the oldest GC generation #19681https://github.com/python/mypy/pull/19681
ilevkivskyihttps://github.com/ilevkivskyi
on Aug 19, 2025https://github.com/python/mypy/issues/3456#event-19231261460
More efficient (fixed-format) serialization (#19668)https://github.com/python/mypy/commit/657bdd84cff780a4b96c04525e2693c074a3fbf3
#19668https://github.com/python/mypy/pull/19668
657bdd8https://github.com/python/mypy/commit/657bdd84cff780a4b96c04525e2693c074a3fbf3
https://github.com/hauntsaninja
hauntsaninjahttps://github.com/hauntsaninja
on Feb 23, 2026https://github.com/python/mypy/issues/3456#issuecomment-3942097842
https://github.com/ilevkivskyi
ilevkivskyihttps://github.com/ilevkivskyi
on Feb 23, 2026https://github.com/python/mypy/issues/3456#issuecomment-3942105327
ilevkivskyihttps://github.com/ilevkivskyi
completedhttps://github.com/python/mypy/issues?q=is%3Aissue%20state%3Aclosed%20archived%3Afalse%20reason%3Acompleted
on Feb 23, 2026https://github.com/python/mypy/issues/3456#event-22987923512
Sign up for freehttps://github.com/signup?return_to=https://github.com/python/mypy/issues/3456
Sign in to commenthttps://github.com/login?return_to=https://github.com/python/mypy/issues/3456
featurehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22feature%22
performancehttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22performance%22
priority-1-normalhttps://github.com/python/mypy/issues?q=state%3Aopen%20label%3A%22priority-1-normal%22
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.