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

Question: Could Nodehun performance increase if there was a Readonly Dictionary Option? #22

Closed
jtemplet opened this issue Mar 20, 2015 · 1 comment

Comments

@jtemplet
Copy link

I was looking at the Nodehun binding code and noticed that in Nodehun::SpellDictionary::checkSuggestions() it sets a lock on the dictionary - before it looks up the word.

In my case, I'm only using the dictionary as read-only, it never changes. So if the dictionary never changes, technically, we don't need a lock on the dictionary and theoretically improving performance.

What I was thinking was that I could provide an option to make the dictionary read-only when you create the dictionary object and then you can just put an if-statement around the locks.

Thoughts?

Jason

@nathanjsweet
Copy link
Collaborator

If you look carefully you'll see that it's a readwrite lock, which means that if all you're doing is reads then the lock won't do anything.

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