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

Low parallelism usage #182

Open
TeofilC opened this issue Oct 28, 2024 · 4 comments
Open

Low parallelism usage #182

TeofilC opened this issue Oct 28, 2024 · 4 comments

Comments

@TeofilC
Copy link
Collaborator

TeofilC commented Oct 28, 2024

I've noticed that when passing -j8 to weeder, it often still uses only one core. See this graph from threadscope
image

@ocharles
Copy link
Owner

There is unfortunately not much we can do to actually do the hard work in parallel, iirc. I don't know how to do a parallel reachability traversal.

@TeofilC
Copy link
Collaborator Author

TeofilC commented Oct 28, 2024

I've dabbled with things like this before, so I might give it a go (when I have some time). After a quick look, I think I've spotted some other low-hanging performance fruit as well

@ocharles
Copy link
Owner

I look forward to seeing what you come up with!

@ryndubei
Copy link
Collaborator

I suppose the reachability traversal could be done more in parallel by searching graphs of individual modules first, taking exported declarations as roots. Then the final single-threaded search becomes a matter of searching through a graph of exports only, rather than all declarations. This may get more complicated in the presence of type class instances, though.

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

3 participants