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
[WIP] Issue #4957: Add MT TreeWalker implementation #4958
Conversation
we released 8.2 version, please rebase all your PRs to our latest master to avoid CI problems |
@soon ping |
@soon Can you rebase your PR? |
@shalugin I have rebased it to master, though I did not run tests on it and therefore current implementation might not work. I will fix these issues a bit later, thank you in advance for understanding. |
@soon , sorry for long silence from my side, please rebase your PR it would help me a lot. |
this model is to fill pool with tasks(features) on each token to visit - enormous futures emission (worse scenario: amount of futures = amount of AST nodes multiplied by amount of Checks). Not good to my mind. If we keep in each Checkers thread separate tree of Checks instances, all we need is to split Checks in groups and do traverse of Tree in parallel in several threads , where each thread will contain separate Check instance. The only nuance here is that some Checks/Modules could be related to each by statics reference hacks - we did not supported that well before ans we will not support this now. If such Checks exists whey should be continued to be execution in separate configuration and separate execution in single-thread Checker. as separate step (idea for future): ideally to spread heavy Checks between groups, but we do not know how heavy is Check, we can measure our Checks only and give them some abstract values 0-9 by annotation to give splitter hints on how to make group that should finish in kind of the same time, to minimize time of waiting. |
@soon I think this can be easily measured. Just run the single-threaded (current) version. Then the multi-threaded version from this patch. With exactly one thread. The difference will be the overhead of the pool of tasks. Please share the results. Perhaps the overhead is so small that it can be ignored. |
I have never been a supporter that Multi-threading the If we have a free thread to spawn a |
I do not support such MT model also. We definitely need to focus on threading Checker first. @rnveach , if you agree, please close this PR. |
Issue #4957
This PR adds the MT mode for TreeWalker fileset check.
WIP untill I implement tests and prepare performance report for changes