No subject


Wed Apr 10 07:51:04 EDT 2013


project on Windows in VS but it was very-very slow and definitely cmake
generates too many project files for VS. For us it was 500+ projects in a
workspace which is too much for Visual Studio. :(

-- 
 Volo Zyko

On Wed, Apr 24, 2013 at 12:37 PM, Gregoire Aujay <gaujay at movea.com> wrote:

>  Hello,****
>
> ** **
>
> Are you using cmake with a Makefiles generator on Windows ?****
>
> ** **
>
> From my experiments here are my observations:****
>
> **-          **Makefiles on Windows: slow****
>
> **-          **Visual ide generator : fast****
>
> **-          **Makefiles on linux: fast****
>
> ** **
>
> I found that when there are many targets in a project, cmake has to write
> many small files on the HD which seems to be very slow on windows.****
>
> ** **
>
> Regards,****
>
> Gregoire****
>
> ** **
>
> ** **
>
> *From:* cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] *On
> Behalf Of *Volo Zyko
> *Sent:* mardi 23 avril 2013 21:51
> *To:* cmake at cmake.org
> *Subject:* [CMake] cmake script profiler****
>
> ** **
>
> Hi all,****
>
> ** **
>
> We have a rather big project and use cmake for building it. At some point
> our cmake scripts became very slow (around 4 minutes for single cmake run).
> We are thinking now how to speed up it. Searching the web and this list
> didn't give any results. It looks like there is no such thing as profiler
> for cmake scripts. Am I right?****
>
> ** **
>
> What about adding such capability to cmake? It looks like cmake's trace
> provides enough info for time profiling, the only thing that it lacks is a
> time stamp. Below is a small patch that adds time stamp and nesting level
> (to simplify building a stack trace) to each trace line. Would it be
> possible to integrate this change to the main line or are there better
> options for time profiling of cmake?****
>
> ** **
>
> diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx****
>
> index 25ccbc7..0e6725c 100644****
>
> --- a/Source/cmMakefile.cxx****
>
> +++ b/Source/cmMakefile.cxx****
>
> @@ -361,6 +361,8 @@ bool cmMakefile::GetBacktrace(cmListFileBacktrace&
> backtrace) const****
>
>  void cmMakefile::PrintCommandTrace(const cmListFileFunction& lff)****
>
>  {****
>
>    cmOStringStream msg;****
>
> +  msg << "(" << std::fixed << cmSystemTools::GetTime();****
>
> +  msg << ") (" << this->CallStack.size() << ") ";****
>
>    msg << lff.FilePath << "(" << lff.Line << "):  ";****
>
>    msg << lff.Name << "(";****
>
>    for(std::vector<cmListFileArgument>::const_iterator i =****
>

--047d7bdc127a2f0fa604db20030d
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>We use Makefiles on Linux and MacOS=
. Windows is not our target platform. From what we see Linux is the fastest=
. We made few attempts of building our project on Windows in VS but it was =
very-very slow and definitely cmake generates too many project files for VS=
. For us it was 500+ projects in a workspace which is too much for Visual S=
tudio. :(<br>
<div class=3D"gmail_extra"><br></div><div class=3D"gmail_extra">--=A0<br><d=
iv dir=3D"ltr">=A0Volo Zyko</div><div dir=3D"ltr"><br></div><div class=3D"g=
mail_quote">On Wed, Apr 24, 2013 at 12:37 PM, Gregoire Aujay <span dir=3D"l=
tr">&lt;<a href=3D"mailto:gaujay at movea.com" target=3D"_blank">gaujay at movea.=
com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
adding-left:1ex">





<div lang=3D"FR" link=3D"blue" vlink=3D"purple">
<div>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)">Hello,<u></u><u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)"><u></u>=A0<u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)">Are you using cmake with a Makefiles g=
enerator on Windows ?<u></u><u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)"><u></u>=A0<u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)">From my experiments here are my observ=
ations:<u></u><u></u></span></p>
<p><u></u><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Calibri,=
sans-serif;color:rgb(31,73,125)"><span>-<span style=3D"font-style:normal;fo=
nt-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-=
family:&#39;Times New Roman&#39;">=A0=A0=A0=A0=A0=A0=A0=A0=A0
</span></span></span><u></u><span lang=3D"EN-US" style=3D"font-size:11pt;fo=
nt-family:Calibri,sans-serif;color:rgb(31,73,125)">Makefiles on Windows: sl=
ow<u></u><u></u></span></p>
<p><u></u><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Calibri,=
sans-serif;color:rgb(31,73,125)"><span>-<span style=3D"font-style:normal;fo=
nt-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-=
family:&#39;Times New Roman&#39;">=A0=A0=A0=A0=A0=A0=A0=A0=A0
</span></span></span><u></u><span lang=3D"EN-US" style=3D"font-size:11pt;fo=
nt-family:Calibri,sans-serif;color:rgb(31,73,125)">Visual ide generator : f=
ast<u></u><u></u></span></p>
<p><u></u><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Calibri,=
sans-serif;color:rgb(31,73,125)"><span>-<span style=3D"font-style:normal;fo=
nt-variant:normal;font-weight:normal;font-size:7pt;line-height:normal;font-=
family:&#39;Times New Roman&#39;">=A0=A0=A0=A0=A0=A0=A0=A0=A0
</span></span></span><u></u><span lang=3D"EN-US" style=3D"font-size:11pt;fo=
nt-family:Calibri,sans-serif;color:rgb(31,73,125)">Makefiles on linux: fast=
<u></u><u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)"><u></u>=A0<u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)">I found that when there are many targe=
ts in a project, cmake has to write many small files on the HD which seems =
to be very slow on windows.<u></u><u></u></span></p>

<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)"><u></u>=A0<u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)">Regards,<u></u><u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)">Gregoire<u></u><u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)"><u></u>=A0<u></u></span></p>
<p class=3D""><span lang=3D"EN-US" style=3D"font-size:11pt;font-family:Cali=
bri,sans-serif;color:rgb(31,73,125)"><u></u>=A0<u></u></span></p>
<p class=3D""><b><span lang=3D"EN-US" style=3D"font-size:10pt;font-family:T=
ahoma,sans-serif">From:</span></b><span lang=3D"EN-US" style=3D"font-size:1=
0pt;font-family:Tahoma,sans-serif"> <a href=3D"mailto:cmake-bounces at cmake.o=
rg" target=3D"_blank">cmake-bounces at cmake.org</a> [mailto:<a href=3D"mailto=
:cmake-bounces at cmake.org" target=3D"_blank">cmake-bounces at cmake.org</a>]
<b>On Behalf Of </b>Volo Zyko<br>
<b>Sent:</b> mardi 23 avril 2013 21:51<br>
<b>To:</b> <a href=3D"mailto:cmake at cmake.org" target=3D"_blank">cmake at cmake=
.org</a><br>
<b>Subject:</b> [CMake] cmake script profiler<u></u><u></u></span></p><div>=
<div class=3D"h5">
<p class=3D""><u></u>=A0<u></u></p>
<div>
<p class=3D"">Hi all,<u></u><u></u></p>
<div>
<p class=3D""><u></u>=A0<u></u></p>
</div>
<div>
<p class=3D"">We have a rather big project and use cmake for building it. A=
t some point our cmake scripts became very slow (around 4 minutes for singl=
e cmake run). We are thinking now how to speed up it. Searching the web and=
 this list didn&#39;t give any
 results. It looks like there is no such thing as profiler for cmake script=
s. Am I right?<u></u><u></u></p>
</div>
<div>
<p class=3D""><u></u>=A0<u></u></p>
</div>
<div>
<p class=3D"">What about adding such capability to cmake? It looks like cma=
ke&#39;s trace provides enough info for time profiling, the only thing that=
 it lacks is a time stamp. Below is a small patch that adds time stamp and =
nesting level (to simplify building
 a stack trace) to each trace line. Would it be possible to integrate this =
change to the main line or are there better options for time profiling of c=
make?<u></u><u></u></p>
</div>
<div>
<p class=3D""><u></u>=A0<u></u></p>
</div>
<div>
<div>
<p class=3D"">diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx<u>=
</u><u></u></p>
</div>
<div>
<p class=3D"">index 25ccbc7..0e6725c 100644<u></u><u></u></p>
</div>
<div>
<p class=3D"">--- a/Source/cmMakefile.cxx<u></u><u></u></p>
</div>
<div>
<p class=3D"">+++ b/Source/cmMakefile.cxx<u></u><u></u></p>
</div>
<div>
<p class=3D"">@@ -361,6 +361,8 @@ bool cmMakefile::GetBacktrace(cmListFileB=
acktrace&amp; backtrace) const<u></u><u></u></p>
</div>
<div>
<p class=3D"">=A0void cmMakefile::PrintCommandTrace(const cmListFileFunctio=
n&amp; lff)<u></u><u></u></p>
</div>
<div>
<p class=3D"">=A0{<u></u><u></u></p>
</div>
<div>
<p class=3D"">=A0 =A0cmOStringStream msg;<u></u><u></u></p>
</div>
<div>
<p class=3D"">+ =A0msg &lt;&lt; &quot;(&quot; &lt;&lt; std::fixed &lt;&lt; =
cmSystemTools::GetTime();<u></u><u></u></p>
</div>
<div>
<p class=3D"">+ =A0msg &lt;&lt; &quot;) (&quot; &lt;&lt; this-&gt;CallStack=
.size() &lt;&lt; &quot;) &quot;;<u></u><u></u></p>
</div>
<div>
<p class=3D"">=A0 =A0msg &lt;&lt; lff.FilePath &lt;&lt; &quot;(&quot; &lt;&=
lt; lff.Line &lt;&lt; &quot;): =A0&quot;;<u></u><u></u></p>
</div>
<div>
<p class=3D"">=A0 =A0msg &lt;&lt; lff.Name &lt;&lt; &quot;(&quot;;<u></u><u=
></u></p>
</div>
<div>
<p class=3D"">=A0 =A0for(std::vector&lt;cmListFileArgument&gt;::const_itera=
tor i =3D<u></u><u></u></p>
</div>
</div>
</div>
</div></div></div>
</div>

</blockquote></div><br><br>
</div></div></div>

--047d7bdc127a2f0fa604db20030d--


More information about the CMake mailing list