Skip to content

Reload metadata in-place #855

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 4, 2022

Conversation

James-REANNZ
Copy link
Contributor

@James-REANNZ James-REANNZ commented Mar 4, 2022

Metadata reloading was previously implemented by loading the metadata,
then replacing references to the old metadata with the new metadata. A
bug in the implementation caused the previous version of the metadata to
be indirectly referenced by the new version of the metadata, resulting
in a steady climb in memory usage.

In fixing the memory leak, I have also changed how metadata is reloaded
to avoid having to replace all existing references, which is prone to
errors and could cause confusing behaviour.

Metadata reloading was previously implemented by loading the metadata,
then replacing references to the old metadata with the new metadata. A
bug in the implementation caused the previous version of the metadata to
be indirectly referenced by the new version of the metadata, resulting
in a steady climb in memory usage.

In fixing the memory leak, I have also changed how metadata is reloaded
to avoid having to replace all existing references, which is prone to
errors and could cause confusing behaviour.
Copy link
Member

@c00kiemon5ter c00kiemon5ter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a better approach.

@c00kiemon5ter c00kiemon5ter added the next-release should become part of the next release label Mar 4, 2022
@c00kiemon5ter c00kiemon5ter merged commit bf6298c into IdentityPython:master Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
next-release should become part of the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants