hm true, but we call Python sub instances multiple times and I have no idea how to cache it for the parent processes.<div>Caching in a file would make it more complicated, because everyone still has the possibility to switch back to <a href="http://mingw.org">mingw.org</a>,</div>

<div>and also would not be that much faster.</div><div><br></div><div>Greetings</div><div><br></div><div>Patrick<br><br><div class="gmail_quote">2011/1/14 Wolfgang Rohdewald <span dir="ltr">&lt;<a href="mailto:wolfgang@rohdewald.de">wolfgang@rohdewald.de</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="font-family:&#39;Monospace&#39;;font-size:10pt;font-weight:400;font-style:normal">
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">caching getGCCTarget() really makes some operations</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">much faster. And emerge prints much less debug</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">messages.</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">I suppose it must be called again as long</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">as Popen fails - but when it succeeded, can</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">gcc change its opinion later on?</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">def getGCCTarget():</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">    # TODO: Cache this!</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">    try:</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">        result = subprocess.Popen(&quot;gcc -dumpmachine&quot;, stdout=subprocess.PIPE).communicate()[0]</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">        utils.debug(&quot;GCC Target Processor:%s&quot; % result, 1 )</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">        return result.strip()</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">    except OSError:</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">        #if no mingw is installed return mingw-w32 it is part of base</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">        return &quot;i686-w64-mingw32&quot;</p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"></p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">-- </p>
<p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px">Wolfgang</p></div><br>_______________________________________________<br>
Kde-windows mailing list<br>
<a href="mailto:Kde-windows@kde.org">Kde-windows@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-windows" target="_blank">https://mail.kde.org/mailman/listinfo/kde-windows</a><br>
<br></blockquote></div><br></div>