Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Remove lazy dictionary tracking #127010

Copy link
Copy link
Closed
Closed
Copy link
@markshannon

Description

@markshannon
Issue body actions

Feature or enhancement

Proposal:

In order to reduce the overhead of cycle GC detection for objects that cannot be part of cycles, we lazily untrack tuples and dictionary that only refer to objects that cannot be part of a cycle.

This is fine for tuples, but dictionaries are mutable, so we need to check every time a dictionary is modified whether it needs to be tracked.

Since most objects no longer have a __dict__ dictionary, the complexity and overhead of this lazy tracking is not worth the small benefit in the cycle GC.

This was originally implemented in #126502, but is largely orthogonal to the main purpose of that PR, so should be implemented separately.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

Labels

3.14bugs and security fixesbugs and security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usage

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.