<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Nov 5, 2016 at 10:27 AM, Richard Duivenvoorde <span dir="ltr"><<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">On <a href="tel:05-11-16%2010" value="+3905111610">05-11-16 10</a>:11, Alessandro Pasotti wrote:<br>
> Hi<br>
><br>
> I've been monitoring the server and I think that with the caching in<br>
> place the timeouts are gone, but of course we need to add the new<br>
> versions as they appear.<br>
><br>
> Richard: what do you think about adding a couple of future versions too,<br>
> so we don't forget?<br>
<br>
</span>Yep, done: 3.0 3.1 3.2 3.3 added<br>
<br>
Currently the nightly requests the ?qgis=3.0 version (see [0])<br>
<br>
by the way, running the get_plugins.xml script takes  2,5 minute<br>
$ time ./get_plugins_xml<br>
real    2m27.058s<br>
user    0m0.040s<br>
sys     0m0.096s<br>
And runs every 10 minutes. Maybe we should bring that up in future, or<br>
make the script faster?<br>
<br></blockquote><div><br><br></div><div>I've already spent quite a lot of time trying to make it faster and it's now indeed much faster: a single run (for a single QGIS version) is ~3 seconds depending on the server load (it was sometimes over 10 seconds before my latest changes!).<br></div><div>What seemed a simple addition (the trusted flag) came out to be a performance killer, because the user "trusted" information is a couple of tables away:<br></div><div>plugin_version -> plugin -> author -> group -> permission<br></div><div><br>We are now using raw queries: <a href="https://github.com/qgis/QGIS-Django/commit/3ffd9c3d989ce144a2cf9d7f02ea2b0dc8f5b5ad">https://github.com/qgis/QGIS-Django/commit/3ffd9c3d989ce144a2cf9d7f02ea2b0dc8f5b5ad</a><br><br></div><div>The problem is also that on that server there are a lot of other processes going on (doc builds for example) that eat resources.<br><br></div><div>I don't think we can achieve much better results without some deep refactoring of the plugins application (adding triggers to set the trusted flag on the plugin version row could be a good starting point)<br><br></div><div><br>BTW, I'd lower the frequency of the caching script: I don't think that waiting 30 minutes or more to see a plugin appear in the XML will kill anyone.<br><br></div></div><br>-- <br><div class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div></div>