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

Stop Clonning values of settings in child Accounts #28

Open
OxidizedLoop opened this issue Dec 3, 2023 · 0 comments
Open

Stop Clonning values of settings in child Accounts #28

OxidizedLoop opened this issue Dec 3, 2023 · 0 comments
Labels
enhancement New feature or request P-high Priority High quality Improve code quality
Milestone

Comments

@OxidizedLoop
Copy link
Owner

OxidizedLoop commented Dec 3, 2023

Currently a parent Account has a owned clone of all the child's settings even when there are multiple levels of nested Accounts, making it so that the same setting exists multiple times needlessly.

Ideally we would make it so we have a reference in the parent Account of a setting present in the child Account

Solutions could be:

An Account having an OwnedSettings, and RefSettings, this would be solving the problem of what to do when .insert() is called in an Account holding child Accounts.

Alternatively just one HashMap exists, but swapping the V in HashMap<K,V> for an Rc<V> or Rc<RefCell<V>>

@OxidizedLoop OxidizedLoop added enhancement New feature or request quality Improve code quality P-low Priority Low labels Dec 3, 2023
@OxidizedLoop OxidizedLoop added P-high Priority High and removed P-low Priority Low labels Jan 24, 2024
@OxidizedLoop OxidizedLoop added this to the 0.6 milestone Jan 26, 2024
@OxidizedLoop OxidizedLoop changed the title Prevent duplication of settings when child Accounts exist Stop Clonning values of settings in child Accounts Jan 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request P-high Priority High quality Improve code quality
Projects
None yet
Development

No branches or pull requests

1 participant