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

Revise concurrency #221

Open
Martoon-00 opened this issue Nov 20, 2022 · 1 comment
Open

Revise concurrency #221

Martoon-00 opened this issue Nov 20, 2022 · 1 comment

Comments

@Martoon-00
Copy link
Member

Clarification and motivation

Let's take a thorough look at how concurrency is used here.

Acceptance criteria

  • Our current use of concurrency is revised.
  • Suggestions are made.
  • Each suggested point, if got an approval, is implemented.
@Martoon-00
Copy link
Member Author

Some my thoughts.

Use paralellization

We should make sure, that all actions for which parallelization makes sense - are applied in parallel.

Some examples:

Do not overuse IO-based concurrency

Currently we verify all the links with a variation of mapConcurrently.

Given that local links checking is a pure action, we could use something lighter for them.
But this is debatable, we will have to try and see how much do we win in practice and whether is the improvement worth the increased complexity.

Limits

If an application can exploit many cores, usually it does not consume all the cores by default and the application provides -j flag for increasing the number of used OS threads.

However, in this case this is probably redundant? Even if the repository contains like 100 .md files, the overall amount of computations should not be larger than several seconds. If we exploit all the cores, that should be a large load for a very short duration.

And actually, I/O likely will dilute the computation part.

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