René's URL Explorer Experiment


Title: gh-84326: Tweak pcbuild settings to reduce the size of the pyshellext shell ext… by ariccio · Pull Request #19284 · python/cpython · GitHub

Open Graph Title: gh-84326: Tweak pcbuild settings to reduce the size of the pyshellext shell ext… by ariccio · Pull Request #19284 · python/cpython

X Title: gh-84326: Tweak pcbuild settings to reduce the size of the pyshellext shell ext… by ariccio · Pull Request #19284 · python/cpython

Description: …ension I've tweaked the pcbuild options for pyshellext to reduce the size of the binary. Since this is a very simple component, there really isn't much benefit of optimizing for speed, likely the slowest part of this component's lifetime is simply loading it. This patch turns on Whole Program Optimization, MinSpace optimization, /Ob2 AnySuitable function inlining (to expose more code to elimination, this does actually help here), /Zo (so that people can still debug it when lots of code has been optimized out), turns of C++ RTTI (nobody is using it), /OPT:REF dead code elimination, /OPT:ICF COMDAT folding, Link Time Code Generation, and DebugFull debugging information creation. /Gw global data optimization seemed to do nothing, which makes sense since there isn't much going on in this project, very little in the way of actual global data. Disabling C++ exceptions both in the project config (i.e. /EH-), and disabling stdlib exceptions via _HAS_EXCEPTIONS=0, had no effect. Strangely, with exceptions disabled and _HAS_EXCEPTIONS=0, exception functions are still emitted in the binary (as seen in IDA). I presume it has something to do with the fact that its a dll. Enabling optimizations (even for Debug builds) should have no effect. The debug builds were not actually using debugging featuers (not even assert), so nothing should change. pyshellext.dll 32 bit improved release size: 25KB size reduction: -17KB % size reduction: 40% pyshellext_d.dll 32 bit unimproved debug size: 85KB pyshellext_d.dll 32 bit improved debug size: 32KB size reduction: -53KB % size reduction: 62% pyshellext.dll 64 bit unimproved release size: 52KB pyshellext.dll 64 bit improved release size: 30KB size reduction: -22KB % size reduction: 42% pyshellext_d.dll 64 bit unimproved debug size: 105KB pyshellext_d.dll 64 bit improved debug size: 38KB size reduction: -67KB % size reduction: 63% https://bugs.python.org/issue40145 Issue: gh-84326

Open Graph Description: …ension I've tweaked the pcbuild options for pyshellext to reduce the size of the binary. Since this is a very simple component, there really isn't much benefit of optimizing for speed, lik...

X Description: …ension I've tweaked the pcbuild options for pyshellext to reduce the size of the binary. Since this is a very simple component, there really isn't much benefit of optimizing for sp...

Opengraph URL: https://github.com/python/cpython/pull/19284

X: @github

direct link

Domain: github.com

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/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:f2e40c2d-010b-6a01-9139-d0e4c42e1081
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9E70:4D9F2:201F712:2A72039:6B023F44
html-safe-nonce90b7901c9b1dcb01fb0dd06b6e282c47b204c6c8883ba217a32abdb9b29e4958
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTcwOjREOUYyOjIwMUY3MTI6MkE3MjAzOTo2QjAyM0Y0NCIsInZpc2l0b3JfaWQiOiIzODcyNjg4NjIwNDkxNDA1NDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac52d3df5fa619b5eacb39d5739a7229212c70d8028c045f97c5020ea3a9943dc7
hovercard-subject-tagpull_request:397269729
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/python/cpython/pull/19284/files
twitter:imagehttps://avatars.githubusercontent.com/u/2142308?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/2142308?s=400&v=4
og:image:alt…ension I've tweaked the pcbuild options for pyshellext to reduce the size of the binary. Since this is a very simple component, there really isn't much benefit of optimizing for speed, lik...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/19284/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F19284%2Ffiles
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%2Fcpython%2Fpull%2F19284%2Ffiles
Sign uphttps://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=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/19284/files
Reloadhttps://github.com/python/cpython/pull/19284/files
Reloadhttps://github.com/python/cpython/pull/19284/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
aricciohttps://github.com/ariccio
python:mainhttps://github.com/python/cpython/tree/main
ariccio:pyshellext-size-reductionhttps://github.com/ariccio/cpython/tree/pyshellext-size-reduction
Conversation 3 https://github.com/python/cpython/pull/19284
Commits 8 https://github.com/python/cpython/pull/19284/commits
Checks 0 https://github.com/python/cpython/pull/19284/checks
Files changed https://github.com/python/cpython/pull/19284/files
Please reload this pagehttps://github.com/python/cpython/pull/19284/files
gh-84326: Tweak pcbuild settings to reduce the size of the pyshellext shell ext… https://github.com/python/cpython/pull/19284/files#top
Show all changes 8 commits https://github.com/python/cpython/pull/19284/files
23c2fa4 Tweak pcbuild settings to reduce the size of the pyshellext shell ext… ariccio Apr 1, 2020 https://github.com/python/cpython/pull/19284/commits/23c2fa447d7f5d577171778ae1a663d680a8635b
7fd6ec2 Merge remote-tracking branch 'upstream/master' into pyshellext-size-r… ariccio Jun 16, 2020 https://github.com/python/cpython/pull/19284/commits/7fd6ec249d0da272c5374561e2f63ba5b3d682bb
1a7a4d1 resuming work on patch after two month hiatus ariccio Jun 16, 2020 https://github.com/python/cpython/pull/19284/commits/1a7a4d1a8bbbc650d99b730988b4f5709e1242fb
16f909d didnt work ariccio Jun 20, 2020 https://github.com/python/cpython/pull/19284/commits/16f909de73e3fdd3054228bbece426b4d0a8bdfd
641dc79 didnt work ariccio Jun 20, 2020 https://github.com/python/cpython/pull/19284/commits/641dc793899737838f9c49ffc658ecb5387bf4a1
c4a5a0e Revert "didnt work" ariccio Jun 20, 2020 https://github.com/python/cpython/pull/19284/commits/c4a5a0eeab275b4531bc6c421fe0db264ca2d54c
7c6152f Revert "didnt work" ariccio Jun 20, 2020 https://github.com/python/cpython/pull/19284/commits/7c6152f632a050f9e628c81b356771dac6004bcc
6bb0b28 trash changes, store for records ariccio Dec 1, 2020 https://github.com/python/cpython/pull/19284/commits/6bb0b2801aeb90fa2657ef5d3b5fb89c45357fda
Clear filters https://github.com/python/cpython/pull/19284/files
Please reload this pagehttps://github.com/python/cpython/pull/19284/files
Please reload this pagehttps://github.com/python/cpython/pull/19284/files
2020-04-01-18-44-11.bpo-40145.oG7AzX.rst https://github.com/python/cpython/pull/19284/files#diff-5685965c674270dd492217c5bbb463eeb8e23abc382ef919ddd50b91e52881ec
pcbuild.sln https://github.com/python/cpython/pull/19284/files#diff-0ea7ec57310c8f7a74b3bb79e5cd3ee907d47909fb68b7b46e5d257793bdd3bc
pyshellext.vcxproj https://github.com/python/cpython/pull/19284/files#diff-202a7943875bae843876676a8f8fb6219bc0c8024e607610dcff0b44f891c68e
Misc/NEWS.d/next/Windows/2020-04-01-18-44-11.bpo-40145.oG7AzX.rsthttps://github.com/python/cpython/pull/19284/files#diff-5685965c674270dd492217c5bbb463eeb8e23abc382ef919ddd50b91e52881ec
View file https://github.com/ariccio/cpython/blob/6bb0b2801aeb90fa2657ef5d3b5fb89c45357fda/Misc/NEWS.d/next/Windows/2020-04-01-18-44-11.bpo-40145.oG7AzX.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/19284/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L190
PCbuild/pcbuild.slnhttps://github.com/python/cpython/pull/19284/files#diff-0ea7ec57310c8f7a74b3bb79e5cd3ee907d47909fb68b7b46e5d257793bdd3bc
View file https://github.com/ariccio/cpython/blob/6bb0b2801aeb90fa2657ef5d3b5fb89c45357fda/PCbuild/pcbuild.sln
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/19284/{{ revealButtonHref }}
https://github.com/python/cpython/pull/19284/files#diff-0ea7ec57310c8f7a74b3bb79e5cd3ee907d47909fb68b7b46e5d257793bdd3bc
https://github.com/python/cpython/pull/19284/files#diff-0ea7ec57310c8f7a74b3bb79e5cd3ee907d47909fb68b7b46e5d257793bdd3bc
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L190
PCbuild/pyshellext.vcxprojhttps://github.com/python/cpython/pull/19284/files#diff-202a7943875bae843876676a8f8fb6219bc0c8024e607610dcff0b44f891c68e
View file https://github.com/ariccio/cpython/blob/6bb0b2801aeb90fa2657ef5d3b5fb89c45357fda/PCbuild/pyshellext.vcxproj
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/19284/{{ revealButtonHref }}
https://github.com/python/cpython/pull/19284/files#diff-202a7943875bae843876676a8f8fb6219bc0c8024e607610dcff0b44f891c68e
https://github.com/python/cpython/pull/19284/files#diff-202a7943875bae843876676a8f8fb6219bc0c8024e607610dcff0b44f891c68e
https://github.com/python/cpython/pull/19284/files#diff-202a7943875bae843876676a8f8fb6219bc0c8024e607610dcff0b44f891c68e
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.