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.

作者 A. Skrobov
收信人 A. Skrobov, christian.heimes, eryksun, paul.moore, rhettinger, serhiy.storchaka, steve.dower, tim.golden, vstinner, zach.ware
日期 2016-03-09.14:07:00
SpamBayes Score -1.0
Marked as misclassified
Message-id <1457532423.49.0.805984681934.issue26415@psf.upfronthosting.co.za>
In-reply-to
内容
The attached patch for the parser reduces "Maximum resident set size (kbytes)" threefold, for the degenerate example of 'import ast; ast.parse("0,"*1000000, mode="eval")', by eliminating many CST nodes that have a single child.

According to the comment in node.c -- "89% of PyObject_REALLOC calls in PyNode_AddChild passed 1 for the size" -- the memory saving should be generally applicable, and not limited just to this degenerate case.

Modules/parsermodule.c is not yet updated to match. Please tell if you want me to do that, in case that my proposed change to the parser is acceptable.
历史
日期 用户 动作 参数
2016-03-09 14:07:03A. Skrobov修改recipients: + A. Skrobov, rhettinger, paul.moore, vstinner, christian.heimes, tim.golden, zach.ware, serhiy.storchaka, eryksun, steve.dower
2016-03-09 14:07:03A. Skrobov修改messageid: <1457532423.49.0.805984681934.issue26415@psf.upfronthosting.co.za>
2016-03-09 14:07:03A. Skrobov链接issue26415 messages
2016-03-09 14:07:03A. Skrobov创建