GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-45115: Enable optimiaztions on Windows debug build by vstinner · Pull Request #28181 · python/cpython

Conversation

@vstinner

@vstinner vstinner commented Sep 6, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

On Windows, enable compiler optimizations on the debug build to make
tests run faster and to reduce the stack memory usage, especially
with static inline functions used in Python public header files.

The Windows GitHub Actions now build Python in debug mode to catch
more bugs.

https://bugs.python.org/issue45115

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@vstinner
bpo-45115: Enable optimiaztions on Windows debug build
6bc0fe6
On Windows, enable compiler optimizations on the debug build to make
tests run faster and to reduce the stack memory usage, especially
with static inline functions used in Python public header files.

The Windows GitHub Actions now build Python in debug mode to catch
more bugs.
@vstinner
vstinner requested a review from a team as a code owner September 6, 2021 15:25
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Sep 6, 2021
@bedevere-bot bedevere-bot added the awaiting core review label Sep 6, 2021
@vstinner

vstinner commented Sep 6, 2021 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member Author

bpo-45115: Enable optimiaztions on Windows debug build #28181

Ooops, there is a typo in the commit message. It can be fixed when the PR is merged.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner mentioned this pull request Sep 6, 2021
bpo-39573: Py_TYPE becomes a static inline function #28128
Merged
@vstinner

vstinner commented Sep 6, 2021

Copy link
Copy Markdown
Member Author

I modified my PR #28128 to see if enabling compiler optimizations fix test_exceptions when Py_TYPE() macro is converted to a static inline function.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 6, 2021

Copy link
Copy Markdown
Member Author

[Reference] Timing of a release build (with optimizations), from PR #28180:

  • Windows x86: Total duration: 9 min 39 sec (test_asyncio.test_sendfile_close_peer_in_the_middle_of_receiving() re-run)
  • Windows x64: Total duration: 9 min 9 sec

[With this PR] GitHub Action jobs with Python built in debug mode with optimizations:

  • Windows x86: Total duration: 13 min 23 sec.
  • Windows x64: Total duration: 10 min 30 sec (test_asyncio.test_sendfile_close_peer_in_the_middle_of_receiving() re-run).

Currently, the slowest job is the Address Sanitizer. IMO as soon as the Windows jobs are faster than the Address Sanitizer job, the little slowdown of this PR on GitHub Action is accepted. And it's way better to test Python on Windows in debug mode!

cc @pablogsal @ambv @corona10 @zware @zooba

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 6, 2021

Copy link
Copy Markdown
Member Author

Building Python in debug mode does fix test_exceptions crash when Py_TYPE() macro is converted to a static inline function:

  • https://bugs.python.org/issue44348
  • bpo-39573: Py_TYPE becomes a static inline function #28128
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

zooba
zooba requested changes Sep 6, 2021
View reviewed changes

@zooba zooba left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking this PR explicitly until we've had the discussion on the issue tracker.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting changes and removed awaiting core review labels Sep 6, 2021
@bedevere-bot

bedevere-bot commented Sep 6, 2021

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner
vstinner marked this pull request as draft September 6, 2021 16:57
@vstinner

vstinner commented Sep 6, 2021

Copy link
Copy Markdown
Member Author

Blocking this PR explicitly until we've had the discussion on the issue tracker.

Ok, I convert this PR to a draft to prevent merging it by mistake.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner

vstinner commented Sep 7, 2021

Copy link
Copy Markdown
Member Author

I rejected my issue: https://bugs.python.org/issue45115#msg401273

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@vstinner vstinner closed this Sep 7, 2021
@vstinner
vstinner deleted the win_debug branch September 7, 2021 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zooba zooba zooba requested changes
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner will be requested when the pull request is marked ready for review AA-Turner is a code owner
@ezio-melotti ezio-melotti Awaiting requested review from ezio-melotti ezio-melotti will be requested when the pull request is marked ready for review ezio-melotti is a code owner
@hugovk hugovk Awaiting requested review from hugovk hugovk will be requested when the pull request is marked ready for review hugovk is a code owner
@webknjaz webknjaz Awaiting requested review from webknjaz webknjaz will be requested when the pull request is marked ready for review webknjaz is a code owner
@itamaro itamaro Awaiting requested review from itamaro itamaro will be requested when the pull request is marked ready for review itamaro is a code owner
@JacobCoffee JacobCoffee Awaiting requested review from JacobCoffee JacobCoffee will be requested when the pull request is marked ready for review JacobCoffee is a code owner
@StanFromIreland StanFromIreland Awaiting requested review from StanFromIreland StanFromIreland will be requested when the pull request is marked ready for review StanFromIreland is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting changes

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@vstinner @bedevere-bot @zooba @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.