<div dir="ltr">On 11 November 2013 00:02, Gonzalo Odiard <span dir="ltr"><<a href="mailto:gonzalo@laptop.org" target="_blank">gonzalo@laptop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div>Local imports are a really bad idea for code maintenance.<div><div><div>
<br></div></div></div></div></blockquote><div><br></div></div><div>I know, and we have discouraged that in the past.</div><div><br></div><div>That is the reason I said "<span style="font-family:arial,sans-serif;font-size:13.333333969116211px">I think this work of identify big libraries used only in specific moments,</span></div>
<div class="im">
<div style="font-family:arial,sans-serif;font-size:13.333333969116211px">can be applied in other cases."</div><div><br></div></div><div>In the case of gstreamer, used to do text to speech, almost the same code is copied</div>
<div>in a few activities (Speak, Clock, Memorize, Write, at least)</div><div>The code check if the espeak plugin in gstreamer is available, and if not try use espeak</div><div>in the command line. Then need initialize gstreamer, and look for the plugin.</div>
<div>That take a few seconds, and is not needed do it before the activity starts. <br></div></div></div></div></blockquote><div><br></div><div>I'm not sure to understand this, I should probably see the code. <br><br>
But all that I'm saying is that gi.repository imports are supposed to have virtually no performance impact, as we have also verified stracing. Big or small library doesn't matter.<br><br>If they do have a performance impact we need to understand why, before trying to work around the problem by moving imports around.<br>
</div></div></div></div>