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

Parallel evaluation #64

Open
danpalmer opened this issue Oct 11, 2018 · 4 comments
Open

Parallel evaluation #64

danpalmer opened this issue Oct 11, 2018 · 4 comments
Assignees

Comments

@danpalmer
Copy link

  • Layer Linter version: latest
  • Python version: 3.6
  • Operating System: macOS

Description

Layer linter takes a while to run on a moderately sized codebase. This is understandable as there's a lot to do, but I noticed that it only maxes out a single logical core. Multi-threaded execution could provide a significant speed boost in the same way that it does for tools like flake8.

What I Did

Ran layer-lint with a single contract covering 400 packages with 14 layers. Time on my MBP is 67 seconds.

@seddonym seddonym self-assigned this Oct 12, 2018
@seddonym
Copy link
Owner

Thanks Dan - I'll definitely consider this. I also have a feeling that the layer checking algorithm isn't optimal.

Out of interest, is your main pain point the duration of each test run per se, or slow feedback when editing/adjusting the layers.yml? If it's the second, probably an easier first step to making things quicker would be a way of caching/reusing the dependency graph.

@danpalmer
Copy link
Author

danpalmer commented Oct 12, 2018

Out of interest, is your main pain point the duration of each test run per se, or slow feedback when editing/adjusting the layers.yml? If it's the second, probably an easier first step to making things quicker would be a way of caching/reusing the dependency graph.

Right now it's the second, because I'm just testing this on my machine. If we put this into CI the second would be my concern as 1 minute of build time is quite a lot. We do parallelise parts of the build already, but a 1 minute (or likely 2+ mins with the final config) phase of the build is still quite long.

I would guess that parallelising might be straightforward? Parallelism per package per contract seems like the way to go? (Not to say it's not significant work, but I'd guess the structure lends itself well to parallelising).

@seddonym
Copy link
Owner

Thanks for these comments. I don't actually know what takes longer, building the graph or analysing the layers, so a bit of benchmarking would be the next step.

@seddonym
Copy link
Owner

Apologies, I closed this unintentionally. Reopening.

@seddonym seddonym reopened this Oct 15, 2018
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