René's URL Explorer Experiment


Title: Fix #14113 (Slow analysis: microchip xc16 code) by glankk · Pull Request #7838 · cppcheck-opensource/cppcheck · GitHub

Open Graph Title: Fix #14113 (Slow analysis: microchip xc16 code) by glankk · Pull Request #7838 · cppcheck-opensource/cppcheck

X Title: Fix #14113 (Slow analysis: microchip xc16 code) by glankk · Pull Request #7838 · cppcheck-opensource/cppcheck

Description: Improves check times for sources with many conditionally includes files by implementing lazy loading of headers. Lazy loading is only implemented for single-config checks because cppcheck currently needs to open all possibly included headers in order to discover configs automatically. Lazy loading for automatic configurations is possible by discovering new configurations as files are loaded, and it's something I think should be implemented in the future. I've done preliminary tests showing that it significantly speeds up check times when using -f, but there are some complications that need to be figured out and it's outside the scope of this PR. Some changes have been made to Preprocessor; since preprocessing has to be done per-file as they are included, many functions have been changed or overloaded to act on a specific file instead of all previously loaded files. Some dumps have been changed to be completed after checking is done, when the full list of included files is known. A test has been added to test/cli/performance_test.py. Benchmarks Test file: $ cat pic1.c #include Before: $ cppcheck -I"C:\Program Files\Microchip\xc16\v2.10\support\generic\h" -I"C:\Program Files\Microchip\xc16\v2.10\support\dsPIC33E\h" -D __dsPIC33EP128GP504__ pic1.c --showtime=file-total Checking pic1.c ... Checking pic1.c: __dsPIC33EP128GP504__=1... Check time: pic1.c: 2m 22.472s After: $ cppcheck -I"C:\Program Files\Microchip\xc16\v2.10\support\generic\h" -I"C:\Program Files\Microchip\xc16\v2.10\support\dsPIC33E\h" -D __dsPIC33EP128GP504__ pic1.c --showtime=file-total Checking pic1.c ... Checking pic1.c: __dsPIC33EP128GP504__=1... Check time: pic1.c: 1.011s

Open Graph Description: Improves check times for sources with many conditionally includes files by implementing lazy loading of headers. Lazy loading is only implemented for single-config checks because cppcheck currently...

X Description: Improves check times for sources with many conditionally includes files by implementing lazy loading of headers. Lazy loading is only implemented for single-config checks because cppcheck currently...

Opengraph URL: https://github.com/cppcheck-opensource/cppcheck/pull/7838

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:641ba053-0d91-e409-da52-93393d660414
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD108:228A12:2337E32:31DCC11:6A4CE2F7
html-safe-nonce532a99ca883233ff1420826779ed988437a0c6c55590de9f16fe80911893a67c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMTA4OjIyOEExMjoyMzM3RTMyOjMxRENDMTE6NkE0Q0UyRjciLCJ2aXNpdG9yX2lkIjoiNzcyMjk2NzQ4NDg0ODcyNjc3NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac09be32b244eea6ac4cf1c50b58bb2e1288cc34313b4efac3a4b73ede93c827b7
hovercard-subject-tagpull_request:2847343077
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/cppcheck-opensource/cppcheck/pull/7838/files
twitter:imagehttps://avatars.githubusercontent.com/u/10298420?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/10298420?s=400&v=4
og:image:altImproves check times for sources with many conditionally includes files by implementing lazy loading of headers. Lazy loading is only implemented for single-config checks because cppcheck currently...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None299b43bca6e02ad35197ffeba30d2466846d5fb02ab96fbced5b5e6cec589fb8
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/cppcheck-opensource/cppcheck git https://github.com/cppcheck-opensource/cppcheck.git
octolytics-dimension-user_id278097703
octolytics-dimension-user_logincppcheck-opensource
octolytics-dimension-repository_id143131
octolytics-dimension-repository_nwocppcheck-opensource/cppcheck
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id143131
octolytics-dimension-repository_network_root_nwocppcheck-opensource/cppcheck
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
releasec5a57f04eeb310f57c73fd6d751d957e2ca27ed2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fcppcheck-opensource%2Fcppcheck%2Fpull%2F7838%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/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/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/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%2Fcppcheck-opensource%2Fcppcheck%2Fpull%2F7838%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=cppcheck-opensource%2Fcppcheck
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Reloadhttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
cppcheck-opensource https://github.com/cppcheck-opensource
cppcheckhttps://github.com/cppcheck-opensource/cppcheck
Notifications https://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck
Fork 1.6k https://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck
Star 6.7k https://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck
Code https://github.com/cppcheck-opensource/cppcheck
Pull requests 205 https://github.com/cppcheck-opensource/cppcheck/pulls
Actions https://github.com/cppcheck-opensource/cppcheck/actions
Security and quality 0 https://github.com/cppcheck-opensource/cppcheck/security
Insights https://github.com/cppcheck-opensource/cppcheck/pulse
Code https://github.com/cppcheck-opensource/cppcheck
Pull requests https://github.com/cppcheck-opensource/cppcheck/pulls
Actions https://github.com/cppcheck-opensource/cppcheck/actions
Security and quality https://github.com/cppcheck-opensource/cppcheck/security
Insights https://github.com/cppcheck-opensource/cppcheck/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fcppcheck-opensource%2Fcppcheck%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fcppcheck-opensource%2Fcppcheck%2Fissues%2Fnew%2Fchoose
glankkhttps://github.com/glankk
cppcheck-opensource:mainhttps://github.com/cppcheck-opensource/cppcheck/tree/main
glankk:14113https://github.com/glankk/cppcheck/tree/14113
Conversation 6 https://github.com/cppcheck-opensource/cppcheck/pull/7838
Commits 3 https://github.com/cppcheck-opensource/cppcheck/pull/7838/commits
Checks 70 https://github.com/cppcheck-opensource/cppcheck/pull/7838/checks
Files changed https://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Fix #14113 (Slow analysis: microchip xc16 code) https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#top
Show all changes 3 commits https://github.com/cppcheck-opensource/cppcheck/pull/7838/files
f7e2461 Fix #14113 glankk Jun 26, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/7838/commits/f7e2461e67b9b3991b034ef542b225ba53cd3e74
7f81189 Add test glankk Jul 7, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/7838/commits/7f81189942d2c5925c8fc9564574abb1fbc9a05d
f753c82 Fix selfcheck issues glankk Jul 7, 2026 https://github.com/cppcheck-opensource/cppcheck/pull/7838/commits/f753c8224889e7ae90986cf18e986847ff92393e
Clear filters https://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
selfcheck.yml https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-e86eba03d49185de1e0c54a7fd86e05e3dd027cd64016b24d3680bb270b2e1f6
.selfcheck_suppressions https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
simplecpp.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
simplecpp.h https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-5de249b712476eed630f7aa08ac2778628851bb73bb8a52f838d0b1daf9d9702
cppcheck.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-925c3b2fbb05c80e182f2b91beeddbec52d71b834acdff75f1e08c54ef47bfff
cppcheck.h https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-207a4188cd5498cf32deba7a72571e0b0dce105745f5914f54416f3a9b4acc86
errorlogger.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-7efe3f6cfedd044c82abaa7d7595b3be1a501c18211cfd9273016c713eb115c6
errorlogger.h https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-d662d3e5b25ed18893dc7fbcfeceea530e06f3b202e54d47bf99f13cdb2fafe8
preprocessor.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-f5811aadbd224edd3442024293db4901b5068dcf5d60e37ce24ebd53e393deb3
preprocessor.h https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-c25644b90eb1da73b15cb25880d44243f9393100da04c37776a834c12e878c4c
performance_test.py https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-2d5ac30aa5271d51a1fb1f094505937d76d80b4af198e307c113159d33128cfc
helpers.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-512766f95dc128f23e8368dde38bd17c2481036acc4e8c25a54a803c512444ca
testcppcheck.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-be484d7085fe05a82123a9a7a493a78c7907ab1027305516f154faeeb84f07c5
testpreprocessor.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-4601dbc3b9fcb7fea0b1de65334fcb3cfcfb6aeb0bf2fd2494de269ba83dd2da
testtokenize.cpp https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-5162281e63cdab22484f0efb01f82af756772df0ceb3625a590c05199f270cf1
.github/workflows/selfcheck.ymlhttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-e86eba03d49185de1e0c54a7fd86e05e3dd027cd64016b24d3680bb270b2e1f6
View file https://github.com/cppcheck-opensource/cppcheck/blob/f753c8224889e7ae90986cf18e986847ff92393e/.github/workflows/selfcheck.yml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/7838/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-e86eba03d49185de1e0c54a7fd86e05e3dd027cd64016b24d3680bb270b2e1f6
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-e86eba03d49185de1e0c54a7fd86e05e3dd027cd64016b24d3680bb270b2e1f6
.selfcheck_suppressionshttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
View file https://github.com/cppcheck-opensource/cppcheck/blob/f753c8224889e7ae90986cf18e986847ff92393e/.selfcheck_suppressions
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/7838/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-0029735cbf6457344008fb0691f75e5f265bbd8aff54ecae28877ec2eeeb3d29
externals/simplecpp/simplecpp.cpphttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
View file https://github.com/cppcheck-opensource/cppcheck/blob/f753c8224889e7ae90986cf18e986847ff92393e/externals/simplecpp/simplecpp.cpp
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/cppcheck-opensource/cppcheck/pull/7838/{{ revealButtonHref }}
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
https://github.com/cppcheck-opensource/cppcheck/pull/7838/files#diff-496617672f41cfff8291030ad82fb898365f845ddf96f9a6c97a039760dade2d
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/7838/files
Please reload this pagehttps://github.com/cppcheck-opensource/cppcheck/pull/7838/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.