-
Notifications
You must be signed in to change notification settings - Fork 585
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 Target JIT? #1395
Comments
If i update the dependency tree using the <=> syntax as follows:
T3 will run earlier, but then T2.2 waits for T3 to finish, which is also undesired as the overall time to complete is still 7 seconds
|
I assume you need to use more <=> arrows. Am 04.10.2016 5:55 nachm. schrieb "Chris Blyth" notifications@github.com:
|
If I put the arrows on 2.1 to 2.3 I get a stack overflow. To me, it seems fake will sort of lazy evaluate the parallel tree and run it at the last possible minute. |
I'm guessing it has everything to do with the ordering here Since this orders by level depending, it will run all the level 3s together, then the level 2s, then the level 1s. |
I'm not on pc right now, but IIRC only things that are bound by <=> are run in parallel. ==> is a sequential operator. |
Yeah, I basically defined 2 sequential operations that have a common start and end. Whilst the steps do run in parallel, the tree with 1 step starts when the last step of the tree with 3 starts. If it were to start when 1st step runs it would be more efficient. I can get parallel targets running without the use of the <=> operator. |
To be clearer, the issue is not about parallel targets running/not running, that works fine. Its more when FAKE starts running the parallel target. |
Mhm I'm open to improvements in the target runner. But unfortunately currently I don't have time for that,but I definitely would appreciate a pr. |
I am happy to look into it (can't promise I'll get it working) As long as you think my thought pattern on running parallel steps as early as possible rather than as late is a good idea. Dont want to spend hours getting it to work to have the project rejected. |
Tbh I never really cared about parallel targets since most of the time my IO wasn't really meant for that. |
Hello, |
Right, I'll give that a go And also don't think I understood the <=> operator |
Hello,
You have a minimum path of 1 plus 3 plus 1. The more threads the better your outcome. This only allowed 2 even though I specified 8. For <=> see its comment and definition: Thank you. Good day. |
Ok I'll try and replicate this on my real world scenario. Should be 5 seconds though surely. |
@pr-yemibedu this may run in 6 seconds, but the dependencies are all wrong
As you can see, T2.1 starts before T1 |
"You do not need to be redundant with the T1 dependency. <=> means the all have a common parent." i also believe to not be accurate statement as:
will force T2.1 to wait for T1 but
will allow T2.1 to run when T1 has not run |
@forki @pr-yemibedu 1st step, create a failing test...BlythMeister@5a9a2f4 That might explain what i am meaning better. |
Hello, |
i am using the latest 4.40.1. I also understand why it is happening due to looking at the code and am working on a way to fix. |
Having got the order working, i realised that all parallel targets work a level at a time. @forki did you want a PR for the re-ordering so they run eagarly, or not as it actually makes no difference to the overall execution |
Hello, I posted in chat I was working on making a runTargetAsync library. Currently here is what it can achieve: Starting Target: T1 Build Time Report Target Duration T1 00:00:01.0010002 It is good enough for me but I have to work on implementing soft dependencies and other test scenarios. The lib is easier than branching for now. Let me know if are things I should include as I get this working. Thank you. Good day. |
Ok yeah that looks awesome! But I would love to see this in! It really solves my problem. |
This library is working for now: Target Concurrency |
Could this not be integrated direct into fake as the way all targets are run? |
This has been implemented now |
I have the following targets as an example
T1 is my base target,
Off of that the T2 chain consists of 3 steps taking 1 second each
The T3 target is a single and takes 3 seconds
T4 will run when the T2 chain and T3 target have completed.
I would expect the total exectution to be 5 seconds:
T1 - 1 second
T3 & T2 Chain - 3 second
T4 - 1 second
However, T3 runs alongside T2.3.
As a result, the total run time is 7 seconds.
Should T3 not start as soon as it is possible to do so, rather than waiting?
The build output is as follows:
The text was updated successfully, but these errors were encountered: