[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2015-10-02 Thread STINNER Victor
Changes by STINNER Victor : -- resolution: -> wont fix status: open -> closed ___ Python tracker ___

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-10-05 Thread STINNER Victor
STINNER Victor added the comment: The cache is released when the string is released. While the string exists it's wchar_t representation can be needed again. That is for what the cache exists. I know. But I don't want to waste memory for this cache. I want to stop using it. IMO the

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-10-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In which use case do you think that the overhead of not using the cache would be important enough? I suppose in the same use case that memory overhead of using the cache is important enough. We need results of performance and memory consumption effect of

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-06 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The cache is released when the string is released. While the string exists it's wchar_t representation can be needed again. That is for what the cache exists. -- ___ Python tracker rep...@bugs.python.org

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Will not this cause performance regression? When we hardly work with wchar_t-based API, it looks good to cache encoded value. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-03 Thread STINNER Victor
STINNER Victor added the comment: Will not this cause performance regression? When we hardly work with wchar_t-based API, it looks good to cache encoded value. Yes, it will be slower. But I prefer slower code with a lower memory footprint. On UNIX, I don't think that anyone will notice the

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-01 Thread STINNER Victor
New submission from STINNER Victor: I would like to deprecate PyUnicode_AsUnicode(), see the issue #22271 for the rationale (hint: memory footprint). To deprecate PyUnicode_AsUnicode(), we should stop using it internally. The attached patch is a work-in-progress patch, untested on Windows

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: Oh, I didn't generated wchar.patch correctly: please ignore changes in the unicodeobject.c files. These changes are part of issues #22271 and #22323. -- ___ Python tracker rep...@bugs.python.org

[issue22324] Use PyUnicode_AsWideCharString() instead of PyUnicode_AsUnicode()

2014-09-01 Thread STINNER Victor
STINNER Victor added the comment: wchar_posixmodule.patch: patch for posixmodule.c. Sorry, the code calling PyUnicode_AsUnicode() was not generated by Argument Clinic in fact. -- Added file: http://bugs.python.org/file36523/wchar_posixmodule.patch