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

only ActivePackage vs. (Package + ActivePackage) #11

Open
Kejsty opened this issue May 12, 2016 · 1 comment
Open

only ActivePackage vs. (Package + ActivePackage) #11

Kejsty opened this issue May 12, 2016 · 1 comment

Comments

@Kejsty
Copy link
Collaborator

Kejsty commented May 12, 2016

I think that there should be ActivePackage for every package available to user with its user_id. Otherwise writing down all packages available to user would take a lot of comparison. ActivePackages only holds its original package_id, so it doesn't take so much memory, and iterate over it for some user_id will be much simplier.

@snurkabill
Copy link
Owner

Possible usecase:

load all active packages and store their id into HashMap. Then you can iterate over all packages and in constant time decide if such active package is needed or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants