This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2021-09-06.15:21:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630941702.52.0.0278112507289.issue45115@roundup.psfhosted.org>
In-reply-to
Content
The Visual Studio project of Python, PCBuild\ directory, disables compiler optimizations when Python is built in debug mode. It seems to be the default in Visual Studio.

Disabling compiler optimizations cause two kinds of issues:

* It increases the stack memory: tests using a deep call stack are more likely to crash (test_pickle, test_marshal, test_exceptions).

* Running the Python test suite take 19 min 41 sec instead of 12 min 19 sec on Windows x64: 1.6x slower. Because of that, we cannot use a debug build in the GitHub Action pre-commit CI, and we miss bugs which are catched "too late", in Windows buildbots. See my latest attempt to use a debug build in GitHub Actions: https://github.com/python/cpython/pull/24914

Example of test_marshal:

        # The max stack depth should match the value in Python/marshal.c.
        # BUG: https://bugs.python.org/issue33720
        # Windows always limits the maximum depth on release and debug builds
        #if os.name == 'nt' and hasattr(sys, 'gettotalrefcount'):
        if os.name == 'nt':
            MAX_MARSHAL_STACK_DEPTH = 1000
        else:
            MAX_MARSHAL_STACK_DEPTH = 2000

I propose to only change the compiler options for the pythoncore project which builds most important files for the Python "core". See attached PR.
History
Date User Action Args
2021-09-06 15:21:42vstinnersetrecipients: + vstinner, paul.moore, tim.golden, zach.ware, steve.dower
2021-09-06 15:21:42vstinnersetmessageid: <1630941702.52.0.0278112507289.issue45115@roundup.psfhosted.org>
2021-09-06 15:21:42vstinnerlinkissue45115 messages
2021-09-06 15:21:42vstinnercreate