Skip to content
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

Garbage collecting or compressing custom OptionTrees #369

Closed
jlstevens opened this issue Dec 19, 2015 · 5 comments
Closed

Garbage collecting or compressing custom OptionTrees #369

jlstevens opened this issue Dec 19, 2015 · 5 comments
Labels
type: feature A major new feature

Comments

@jlstevens
Copy link
Contributor

Currently when a style customization is applied, one or more custom option trees are added to the Store object. These option trees persist and accumulate until the kernel is restarted after which point they can be added again by either running the customizations again or via unpickling.

Creating an OptionTree is cheap and each tree doesn't consume much memory. Nonetheless, we have no way of eliminating unused trees (i.e garbage collection) or of compressing identical trees together. This is particularly an issue using DynamicMap where you can easily generate an unbounded number of option trees.

Some ideas of how this might be addressed are discussed in the PR introducing styles to DynamicMap (#368). In short, it would be possible to use tree comparisons to keep only unique trees and store only the associated ids (compression). Garbage collection is harder as you would probably need to find the set of all ids currently applicable in the namespace to find out which option trees are no longer in use.

@jlstevens jlstevens added the type: feature A major new feature label Dec 19, 2015
@philippjfr
Copy link
Member

Do we still think this is an actual problem in practice? After having worked with them for >2 years now I don't think the size of option trees is a particular concern.

@jlstevens
Copy link
Contributor Author

Right, I don't think it is a problem in most cases why this issue concerns a low priority feature rather than a bug...

@philippjfr
Copy link
Member

I don't think we should keep features we have no intention of ever implementing around, it's just clutter.

@jlstevens
Copy link
Contributor Author

It is still a potential memory leak though you would probably need a huge number of option trees before it would be a problem. Anyway, as it hasn't been a problem in practice I will close this issue.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature A major new feature
Projects
None yet
Development

No branches or pull requests

2 participants