<html><head><style data-externalstyle="true"><!--
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
}

p.MsoListParagraphCxSpFirst, li.MsoListParagraphCxSpFirst, div.MsoListParagraphCxSpFirst, p.MsoListParagraphCxSpMiddle, li.MsoListParagraphCxSpMiddle, div.MsoListParagraphCxSpMiddle, p.MsoListParagraphCxSpLast, li.MsoListParagraphCxSpLast, div.MsoListParagraphCxSpLast {
margin-top:0in;
margin-right:0in;
margin-bottom:0in;
margin-left:.5in;
margin-bottom:.0001pt;
line-height:115%;
}
--></style></head><body><div data-externalstyle="false" dir="ltr" style="font-family:Calibri,'Segoe UI',Meiryo,'Microsoft YaHei UI','Microsoft JhengHei UI','Malgun Gothic','Khmer UI','Nirmala UI',Tunga,'Lao UI',Ebrima,sans-serif;font-size:12pt;"><div>Under MSYS, I don’t think it’s a fork thing... I think it’s a file-system thing.</div><div>&nbsp;</div><div>When I run&nbsp;“time cmake --version” twice in a row in the MSYS git bash prompt, I get this:</div><div>&nbsp;</div><div><a title="mailto:davidcole@WOK" href="mailto:davidcole@WOK" target="_parent">davidcole@WOK</a> /c/dev<br>$ time cmake --version<br>cmake version 2.8.10.2</div><div>&nbsp;</div><div>real&nbsp;&nbsp;&nbsp; 0m0.215s<br>user&nbsp;&nbsp;&nbsp; 0m0.015s<br>sys&nbsp;&nbsp;&nbsp;&nbsp; 0m0.046s</div><div>&nbsp;</div><div><a title="mailto:davidcole@WOK" href="mailto:davidcole@WOK" target="_parent">davidcole@WOK</a> /c/dev<br>$ time cmake --version<br>cmake version 2.8.10.2</div><div>&nbsp;</div><div>real&nbsp;&nbsp;&nbsp; 0m0.070s<br>user&nbsp;&nbsp;&nbsp; 0m0.015s<br>sys&nbsp;&nbsp;&nbsp;&nbsp; 0m0.015s</div><div>&nbsp;</div><div>First time is slower, like you measured. Second time is quick. File-system caching effects would explain this.</div><div data-signatureblock="true">&nbsp;</div><div data-signatureblock="true">&nbsp;</div><div data-signatureblock="true">David</div><div data-signatureblock="true">&nbsp;</div><div data-signatureblock="true">&nbsp;</div><div style="padding-top: 5px; border-top-color: rgb(229, 229, 229); border-top-width: 1px; border-top-style: solid;"><div><font face="Calibri, 'Segoe UI', Meiryo, 'Microsoft YaHei UI', 'Microsoft JhengHei UI', 'Malgun Gothic', 'Khmer UI', 'Nirmala UI', Tunga, 'Lao UI', Ebrima, sans-serif" style='line-height: 15pt; letter-spacing: 0.02em; font-family: Calibri, "Segoe UI", Meiryo, "Microsoft YaHei UI", "Microsoft JhengHei UI", "Malgun Gothic", "Khmer UI", "Nirmala UI", Tunga, "Lao UI", Ebrima, sans-serif; font-size: 11pt;'><b>From:</b>&nbsp;Alan W. Irwin<br><b>Sent:</b>&nbsp;‎Monday‎, ‎May‎ ‎20‎, ‎2013 ‎5‎:‎01‎ ‎AM<br><b>To:</b>&nbsp;marco atzeri<br><b>Cc:</b>&nbsp;cmake@cmake.org</font></div></div><div>&nbsp;</div>On 2013-05-20 07:51+0200 marco atzeri wrote:<br><br>&gt; the slowness at startup on cywin is mainly due the fork<br>&gt; implementation<br>&gt; http://cygwin.com/faq/faq-nochunks.html#faq.api.fork<br>&gt;<br>&gt; unfortunately windows makes a real fork implementation very inefficient.<br><br>Hi Marco:<br><br>Your explanation sounds reasonable since it appears all new processes<br>are started with fork, but do you have a reference for that conclusion<br>that gives more specifics? All the above URL says is that fork can be<br>"a little slow" on Cygwin with no timing specifics.<br><br>Assuming this is the complete explanation for Cygwin startup latency,<br>I assume it is also the explanation of the MSYS bash.exe startup<br>latency (factor of 25 slowdown for startup) for all commands that I<br>found on Wine (a version of Windows whose developers try very hard to<br>make an exact clone of Microsoft Windows).&nbsp; The inefficient fork<br>explanation would also predict that commands executed under bash.exe<br>on Microsoft Windows would also show the same startup latency issue.<br><br>Can somebody with access to MSYS bash.exe on Microsoft Windows verify<br>that startup latency by timing "--version" options for standard<br>commands such as cmake?&nbsp; If such times on a normal PC are hundreds of<br>milliseconds than you have confirmed the issue, but if they are only a<br>few milliseconds (8 on Linux, for example, for my entry level PC<br>hardware), then you have shown the issue doesn't exist for Microsoft<br>Windows which would contradict the above inefficient fork explanation.<br><br>Alan<br><br>__________________________<br>Alan W. Irwin<br><br>Astronomical research affiliation with Department of Physics and Astronomy,<br>University of Victoria (astrowww.phys.uvic.ca).<br><br>Programming affiliations with the FreeEOS equation-of-state<br>implementation for stellar interiors (freeeos.sf.net); the Time<br>Ephemerides project (timeephem.sf.net); PLplot scientific plotting<br>software package (plplot.sf.net); the libLASi project<br>(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);<br>and the Linux Brochure Project (lbproject.sf.net).<br>__________________________<br><br>Linux-powered Science<br>__________________________<br>--<br><br>Powered by www.kitware.com<br><br>Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html<br><br>Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://www.cmake.org/mailman/listinfo/cmake<br></div></body></html>