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

Make DawgBuilder.Insert thread-safe #1

Closed
bzaar opened this issue Sep 28, 2014 · 1 comment
Closed

Make DawgBuilder.Insert thread-safe #1

bzaar opened this issue Sep 28, 2014 · 1 comment

Comments

@bzaar
Copy link
Owner

bzaar commented Sep 28, 2014

... and verify that this actually speeds up things on a typical 4-core system. Excessive locking might negate all the benefits of parallelism. Try locking at Node and DawgBuilder levels and see what difference it makes.

@bzaar
Copy link
Owner Author

bzaar commented Sep 7, 2015

I have actually tried out the above suggestions and couldn't make it run any faster. Locking at the Node level is immensely slow because it has to create millions of ReaderWriterLock's and those are really expensive. Locking the whole tree doesn't do much good either: the process essentially becomes single threaded and the locking is just making it slower.

@bzaar bzaar closed this as completed Sep 7, 2015
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

1 participant