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

Added Singleton Object to load generated Data #8

Merged
merged 2 commits into from
Oct 1, 2014

Conversation

jessemx109
Copy link
Contributor

This adds the singleton object so memory doesn't grow to huge amounts. Look at what functions I moved into the new object so see if any are not needed in the standard DBMatcher Ojbect

…e frequency lists and adjacency graphs so memory does not grow out of control on large passwords
@jessemx109 jessemx109 closed this Sep 25, 2014
@jessemx109 jessemx109 reopened this Sep 25, 2014
@@ -629,6 +630,144 @@ - (NSString *)translate:(NSString *)string characterMap:(NSDictionary *)chrMap

@end

@implementation DBMatchResources
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this section duplicate code? Or are you just changing the name of the object. I can't tell from GitHub.

@leah
Copy link
Collaborator

leah commented Sep 25, 2014

I think a singleton for the matcher is a great idea! However, I think maybe the whole object could be a singleton instead. Want to try to make it more comprehensive?

@jessemx109
Copy link
Contributor Author

I added a new object to the file to handle to resource allocations

@jessemx109
Copy link
Contributor Author

I was going to do that first but wasn't sure if it would cause problems in other calls having the same object be modified by multiple calls

@leah
Copy link
Collaborator

leah commented Sep 25, 2014

Hmm... you're right. Adding the (ever changing) user inputs to the matchers would mess things up. I'd still like to not duplicate the methods used to generate the data. Maybe just have the omnimatch method in DBMatcher and everything else in DBMatchResources?

@jessemx109
Copy link
Contributor Author

ya I wasn't sure what methods I could safely take out from the existing code

@leah
Copy link
Collaborator

leah commented Sep 25, 2014

@jessemx109 want to take a stab at it? Or I can make the change if you prefer.

Again, thanks for coming up with the idea.

@jessemx109
Copy link
Contributor Author

Ya I can take a look at it tonight

@leah
Copy link
Collaborator

leah commented Sep 25, 2014

👍

@jessemx109
Copy link
Contributor Author

Ok finally got time to remove those duplicate methods. I took out three methods that are only used once and left the two that are used in other places

@leah leah merged commit 561d84b into dropbox:master Oct 1, 2014
leah added a commit that referenced this pull request Oct 1, 2014
@leah
Copy link
Collaborator

leah commented Oct 1, 2014

I made a few small changes to the formatting to look more like the original zxcvbn, mostly just made everything lowercase 😝

@leah
Copy link
Collaborator

leah commented Oct 1, 2014

Thanks for your help! 🎉 🏆

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

Successfully merging this pull request may close these issues.

2 participants