René's URL Explorer Experiment


Title: Python: unpin legacy CFG/ESSA from the AST cached stage (DCA measurement) by yoff · Pull Request #22116 · github/codeql · GitHub

Open Graph Title: Python: unpin legacy CFG/ESSA from the AST cached stage (DCA measurement) by yoff · Pull Request #22116 · github/codeql

X Title: Python: unpin legacy CFG/ESSA from the AST cached stage (DCA measurement) by yoff · Pull Request #22116 · github/codeql

Description: NoteDraft for measurement. This PR exists to run DCA and quantify how much of the shared-CFG dataflow flip's overhead is recovered by not computing the legacy CFG. It is based on the flip branch (yoff/python-shared-cfg-dataflow-flip, #21925), so the diff is exactly the one-commit change and the DCA a/b isolates the effect of the unpin. What The legacy CFG (Flow.qll) and legacy ESSA (Essa/SsaCompute/SsaDefinitions) are pinned into the always-on Stages::AST cached stage via Stages::AST::ref() (11 sites) and the matching Stages::AST::backref() disjuncts. backref() is referenced nowhere and optimizes to 1 = 1, so the ref/backref pattern only controls stage assignment. Because a cached stage is materialised as a unit once any of its predicates is demanded — and every query demands e.g. Expr.toString() — this forces the legacy CFG/ESSA to be computed for every query. After the shared-CFG dataflow flip, the security/dataflow queries no longer depend on the legacy CFG at all, so on the flip branch this computation is pure dead weight. This PR removes those pins. Since Stages::AST::ref() is 1 = 1, the change is result-preserving — it only changes stage scheduling. Verification (result-preserving) Full python-security-extended suite (52 queries) and django: legacy CFG/ESSA predicate families materialised drop from ~165 → 0, with byte-identical results. Cold, fresh-DB django: 59.9s → 57.6s wall (-j4); ~9.5s of legacy predicate self-time removed (≈1.3% of total analysis CPU). Question DCA should answer The legacy CFG the security queries drag in (~9.5s CPU, 1.3%) is a fraction of the new CFG+SSA the flip adds (~37.6s CPU, 5.3%), so a-priori this recovers only ~a quarter of the new-CFG cost, not the full flip overhead. DCA across the target set will give the authoritative per-project number. Caveats before this could merge This is a global stage change. Security queries win; the points-to/quality queries (which genuinely use legacy ESSA) will still compute it, but now in their own stage(s) rather than sharing the AST stage — need to confirm no regression there. A cleaner design would pin legacy CFG/ESSA to an explicit dedicated stage instead of leaving placement to the optimizer.

Open Graph Description: NoteDraft for measurement. This PR exists to run DCA and quantify how much of the shared-CFG dataflow flip's overhead is recovered by not computing the legacy CFG. It is based on the flip branc...

X Description: NoteDraft for measurement. This PR exists to run DCA and quantify how much of the shared-CFG dataflow flip's overhead is recovered by not computing the legacy CFG. It is based on the flip b...

Opengraph URL: https://github.com/github/codeql/pull/22116

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:fd71b5de-b217-267d-9db3-f1022e934a97
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8020:9775E:41BD4C9:5D0707D:6A4FB4AD
html-safe-nonce9642055e5bf19e4f6cda302a9a642c04e8fa395e4e5e69278c6d685009108fee
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MDIwOjk3NzVFOjQxQkQ0Qzk6NUQwNzA3RDo2QTRGQjRBRCIsInZpc2l0b3JfaWQiOiIzOTc0MTEyOTA4Mzk3MjI5MjI5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca141c7f26f20e18fa8f40fdfcfe5b644298f0046d867c5995c621f955c9ac2c7
hovercard-subject-tagpull_request:3981911582
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/github/codeql/pull/22116/files
twitter:imagehttps://avatars.githubusercontent.com/u/647347?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/647347?s=400&v=4
og:image:altNoteDraft for measurement. This PR exists to run DCA and quantify how much of the shared-CFG dataflow flip's overhead is recovered by not computing the legacy CFG. It is based on the flip branc...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneb92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/github/codeql git https://github.com/github/codeql.git
octolytics-dimension-user_id9919
octolytics-dimension-user_logingithub
octolytics-dimension-repository_id143040428
octolytics-dimension-repository_nwogithub/codeql
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143040428
octolytics-dimension-repository_network_root_nwogithub/codeql
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
release4b249b445842943ed31549e027f57a8ade9881ed
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/github/codeql/pull/22116/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgithub%2Fcodeql%2Fpull%2F22116%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
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%2Fgithub%2Fcodeql%2Fpull%2F22116%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=github%2Fcodeql
Reloadhttps://github.com/github/codeql/pull/22116/files
Reloadhttps://github.com/github/codeql/pull/22116/files
Reloadhttps://github.com/github/codeql/pull/22116/files
Please reload this pagehttps://github.com/github/codeql/pull/22116/files
github https://github.com/github
codeqlhttps://github.com/github/codeql
Notifications https://github.com/login?return_to=%2Fgithub%2Fcodeql
Fork 2k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Star 9.8k https://github.com/login?return_to=%2Fgithub%2Fcodeql
Code https://github.com/github/codeql
Issues 988 https://github.com/github/codeql/issues
Pull requests 425 https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality 0 https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Code https://github.com/github/codeql
Issues https://github.com/github/codeql/issues
Pull requests https://github.com/github/codeql/pulls
Discussions https://github.com/github/codeql/discussions
Actions https://github.com/github/codeql/actions
Projects https://github.com/github/codeql/projects
Models https://github.com/github/codeql/models
Security and quality https://github.com/github/codeql/security
Insights https://github.com/github/codeql/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgithub%2Fcodeql%2Fissues%2Fnew%2Fchoose
yoffhttps://github.com/yoff
yoff/python-shared-cfg-dataflow-fliphttps://github.com/github/codeql/tree/yoff/python-shared-cfg-dataflow-flip
yoff/python-unpin-legacy-cfg-from-ast-stagehttps://github.com/github/codeql/tree/yoff/python-unpin-legacy-cfg-from-ast-stage
Conversation 0 https://github.com/github/codeql/pull/22116
Findings https://github.com/github/codeql/pull/22116/findings
Commits 1 https://github.com/github/codeql/pull/22116/commits
Checks 2 https://github.com/github/codeql/pull/22116/checks
Files changed 5 https://github.com/github/codeql/pull/22116/files
Python: unpin legacy CFG/ESSA from the AST cached stage (DCA measurement) https://github.com/github/codeql/pull/22116/files#top
Show all changes 1 commit https://github.com/github/codeql/pull/22116/files
bf12204 Python: unpin legacy CFG/ESSA from the AST cached stage yoff Jul 2, 2026 https://github.com/github/codeql/pull/22116/commits/bf1220463ccf44f0749c6abd7f61071119a2d2d9
Clear filters https://github.com/github/codeql/pull/22116/files
Please reload this pagehttps://github.com/github/codeql/pull/22116/files
Please reload this pagehttps://github.com/github/codeql/pull/22116/files
Flow.qll https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
Essa.qll https://github.com/github/codeql/pull/22116/files#diff-9ffeb35c95d4d4e5920076eba92fb7b2e937c32eec8506d04003af805761d342
SsaCompute.qll https://github.com/github/codeql/pull/22116/files#diff-3a027d1ff4a749ce26edd47fe0f88c07321b5fab11b6aa7075593869aa348a9c
SsaDefinitions.qll https://github.com/github/codeql/pull/22116/files#diff-d6875ed883f35bc28f955217d505190d60a84776580d298a27f7fd9bdec27588
CachedStages.qll https://github.com/github/codeql/pull/22116/files#diff-46b814901079d835f972dddb82e226b81c48229a834a19241fad1ad35efd01ec
https://github.com/github/codeql/blob/yoff/python-shared-cfg-dataflow-flip/CODEOWNERS#L19
python/ql/lib/semmle/python/Flow.qllhttps://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
View file https://github.com/github/codeql/blob/bf1220463ccf44f0749c6abd7f61071119a2d2d9/python/ql/lib/semmle/python/Flow.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22116/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/pull/22116/files#diff-7940650398a16e6be47036f5e846dc42df30738d9c25ee0760811018150ca4b4
https://github.com/github/codeql/blob/yoff/python-shared-cfg-dataflow-flip/CODEOWNERS#L19
python/ql/lib/semmle/python/essa/Essa.qllhttps://github.com/github/codeql/pull/22116/files#diff-9ffeb35c95d4d4e5920076eba92fb7b2e937c32eec8506d04003af805761d342
View file https://github.com/github/codeql/blob/bf1220463ccf44f0749c6abd7f61071119a2d2d9/python/ql/lib/semmle/python/essa/Essa.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22116/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22116/files#diff-9ffeb35c95d4d4e5920076eba92fb7b2e937c32eec8506d04003af805761d342
https://github.com/github/codeql/pull/22116/files#diff-9ffeb35c95d4d4e5920076eba92fb7b2e937c32eec8506d04003af805761d342
https://github.com/github/codeql/blob/yoff/python-shared-cfg-dataflow-flip/CODEOWNERS#L19
python/ql/lib/semmle/python/essa/SsaCompute.qllhttps://github.com/github/codeql/pull/22116/files#diff-3a027d1ff4a749ce26edd47fe0f88c07321b5fab11b6aa7075593869aa348a9c
View file https://github.com/github/codeql/blob/bf1220463ccf44f0749c6abd7f61071119a2d2d9/python/ql/lib/semmle/python/essa/SsaCompute.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22116/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22116/files#diff-3a027d1ff4a749ce26edd47fe0f88c07321b5fab11b6aa7075593869aa348a9c
https://github.com/github/codeql/pull/22116/files#diff-3a027d1ff4a749ce26edd47fe0f88c07321b5fab11b6aa7075593869aa348a9c
https://github.com/github/codeql/blob/yoff/python-shared-cfg-dataflow-flip/CODEOWNERS#L19
python/ql/lib/semmle/python/essa/SsaDefinitions.qllhttps://github.com/github/codeql/pull/22116/files#diff-d6875ed883f35bc28f955217d505190d60a84776580d298a27f7fd9bdec27588
View file https://github.com/github/codeql/blob/bf1220463ccf44f0749c6abd7f61071119a2d2d9/python/ql/lib/semmle/python/essa/SsaDefinitions.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22116/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22116/files#diff-d6875ed883f35bc28f955217d505190d60a84776580d298a27f7fd9bdec27588
https://github.com/github/codeql/pull/22116/files#diff-d6875ed883f35bc28f955217d505190d60a84776580d298a27f7fd9bdec27588
https://github.com/github/codeql/blob/yoff/python-shared-cfg-dataflow-flip/CODEOWNERS#L19
python/ql/lib/semmle/python/internal/CachedStages.qllhttps://github.com/github/codeql/pull/22116/files#diff-46b814901079d835f972dddb82e226b81c48229a834a19241fad1ad35efd01ec
View file https://github.com/github/codeql/blob/bf1220463ccf44f0749c6abd7f61071119a2d2d9/python/ql/lib/semmle/python/internal/CachedStages.qll
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/github/codeql/pull/22116/{{ revealButtonHref }}
https://github.com/github/codeql/pull/22116/files#diff-46b814901079d835f972dddb82e226b81c48229a834a19241fad1ad35efd01ec
https://github.com/github/codeql/pull/22116/files#diff-46b814901079d835f972dddb82e226b81c48229a834a19241fad1ad35efd01ec
https://github.com/github/codeql/pull/22116/files#diff-46b814901079d835f972dddb82e226b81c48229a834a19241fad1ad35efd01ec
https://github.com/github/codeql/pull/22116/files#diff-46b814901079d835f972dddb82e226b81c48229a834a19241fad1ad35efd01ec
Please reload this pagehttps://github.com/github/codeql/pull/22116/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.