<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Wed, Nov 14, 2018 at 10:20 AM Poughon Victor <<a href="mailto:Victor.Poughon@cnes.fr">Victor.Poughon@cnes.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all<br>
<br>
I am working on a large C++ project using CMake (<a href="https://www.orfeo-toolbox.org/" rel="noreferrer" target="_blank">https://www.orfeo-toolbox.org/</a>) and our 'configure' step takes quite a lot of time. This can be annoying for developers working on features where the configure step needs to be re-run, or for CI in general. <br>
<br>
We have looked into it a bit and it seems like one issue is that the configure/generate steps do a lot of small files I/O. Specifically, using:<br>
<br>
inotofy-wait -mr <build_dir><br>
<br>
shows that "cmake ." causes about 150K file access/modify, etc. There are some especially guilty looking files like 'Makefile2.tmp' or 'progress.tmp' that appear thousands of times in most of the log file.<br>
<br>
I have an SSD which somewhat helps, but for colleagues still on mechanical drives this is especially painful. Is there a way to disable writing all those files to the disk?<br>
<br>
Any other tips on optimizing the performance of 'cmake .'?<br>
<br>
Thanks,<br>
<br>
Victor Poughon<br><br></blockquote><div><br></div><div>Hi,</div><div><br></div><div>if a subsequent CMake run is faster than the initial one, you can have a look at</div><div><a href="https://github.com/cristianadam/cmake-checks-cache">https://github.com/cristianadam/cmake-checks-cache</a> <br></div><div><br></div><div>If you cache the results of the configure checks you can have the initial run as fast as subsequent ones!</div><div><br></div><div>Cheers,</div><div>Cristian.</div><div><br></div><div> </div></div></div></div>