Conversation
|
I timed some builds and wrote down my results: https://gist.github.com/kRITZCREEK/c2070885d70cdcb047866ed395a06cb7 It's a pretty clear improvement. |
…o smarter-make
|
Who can I ask to take a look at this? :) I need this to go in before I can start working on only parsing module headers to build the module graph. |
|
Unfortunately the diff is pretty much useless, I'm inclined to say |
| else return Nothing | ||
|
|
||
| -- | A set of make actions that read and write modules from the given directory. | ||
| buildMakeActions |
There was a problem hiding this comment.
Everything downwards from here moved into Make.Actions
| return externs | ||
|
|
||
| -- | A monad for running make actions | ||
| newtype Make a = Make |
There was a problem hiding this comment.
This was moved into Make.Monad
|
|
||
| (sorted, graph) <- sortModules ms | ||
|
|
||
| barriers <- zip (map getModuleName sorted) <$> replicateM (length ms) ((,) <$> C.newEmptyMVar <*> C.newEmptyMVar) |
There was a problem hiding this comment.
The real change in this PR is this section, which is now broken down between Make.BuildPlan and here.
Instead of checking the timestamps of the dependencies of a module before building it, we now check all the timestamps once, and make a plan of which modules need to be rebuilt (BuildPlan.construct).
|
I've successfully used this for a while now, so I'm confident it works. I've added a few comments to differentiate noise from actual change in the PR. Any remaining questions? |
|
Sorry, I meant to comment back here - I did actually read it a bit after you added the comments, and yeah it seems reasonable to me! |
|
Thanks, I'll merge it then. |
This significantly improves startup time on incremental builds with lots of already built modules.
I'll still move things around and document what's happening here, but this change can be backported to 0.11.7 as is, and I'd like people to try that and see what kind of numbers they get, and if their projects still build properly. Thanks!