Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

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

wants to merge 1 commit into from

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 6, 2021

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

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
Copy link
Member Author

vstinner commented Sep 6, 2021

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.

@vstinner
Copy link
Member Author

vstinner commented Sep 6, 2021

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.

@vstinner
Copy link
Member Author

vstinner commented Sep 6, 2021

[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

@vstinner
Copy link
Member Author

vstinner commented Sep 6, 2021

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

Copy link
Member

@zooba zooba left a 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.

@bedevere-bot
Copy link

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

@vstinner vstinner marked this pull request as draft September 6, 2021 16:57
@vstinner
Copy link
Member Author

vstinner commented Sep 6, 2021

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.

@vstinner
Copy link
Member Author

vstinner commented Sep 7, 2021

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

@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants