[issue21110] Slowdown and high memory usage when adding a new module in embedded Python 3.4 on 64bit Windows

MrValdez report at bugs.python.org
Mon Mar 31 12:35:23 CEST 2014


New submission from MrValdez:

The example in the "Extending Embedded Python" (https://docs.python.org/3/extending/embedding.html#extending-embedded-python) takes up a lot of memory and slow downs the computer. I am using Windows 7 64bit, Python 3.4 64bit and gcc (rubenvb-4.8.0) 4.8.0.

Solution:

Apparently, you need to add this to your C program:

#define HAVE_SSIZE_T

I found the solution at (https://forums.embarcadero.com/message.jspa?messageID=581594). The page said that when adding the above, "this ensures that the type Py_ssize_t becomes __int64 instead of int."


Expected: 

The programmer should not see a simple program (that came from the main documentation, no less) causing slowdowns and high memory usage. The 64bit version of the Python installer was downloaded so the programmer should, at least, not need to know that they need this flag. 

Can the Python.h in the 64 bit builds automatically set the flag? Or, if this isn't feasible, add a note to the documentation that this flag exist.

----------
components: Windows
messages: 215227
nosy: MrValdez
priority: normal
severity: normal
status: open
title: Slowdown and high memory usage when adding a new module in embedded Python 3.4 on 64bit Windows
type: performance
versions: Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21110>
_______________________________________


More information about the Python-bugs-list mailing list