Skip to content

PEP 617 consumes 2x RSS memory #123282

Closed as not planned
Closed as not planned
@xinsheng3

Description

@xinsheng3

Feature or enhancement

Proposal:

import time


class MemoryCheck(object):
    @staticmethod
    def insert_packages():
        pass

    def setup(self):
        pass

    def process(self):
        pass

    def exit(self):
        pass


# copy total "class MemoryCheck(object)" for 512 times

if __name__ == "__main__":
    while True:
        time.sleep(10)

Copy the class in the preceding script for 512 times and verify the script.

[root@localhost ~]# python3 -V
Python 3.9.9
[root@localhost ~]# python3 test_512.py &
[4] 5715
[root@localhost ~]# pmap -x 5715|grep total
total kB 37256 16968 12176


[root@localhost ~]# python3 -V
Python 3.13.0b3+
[root@localhost ~]# python3 test_512.py &
[2] 2117463
[root@localhost ~]# pmap -x 2117463|grep total
total kB 1076668 31840 25384

python3.9 16968 KB
python3.13 31840KB, 2x memory difference

The difference in this RSS feed comes from this commit:
c5fc156

Has this already been discussed elsewhere?

No response given

Links to previous discussion of this feature:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    pendingThe issue will be closed if no feedback is providedperformancePerformance or resource usagetopic-parsertype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions