<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi,</p>
    <div dir="auto">> You should set the other new read optimisation
      flags here -- see <a
href="https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962"
        class="moz-txt-link-freetext">https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962</a></div>
    <div dir="auto"><br>
    </div>
    <div dir="auto">These are already available also in 3.24 and we use
      the   `TrustLayerMetadata` in the above test. For server,  the
      other flags are not applicable (Getprint requests need print
      layouts ).</div>
    <div dir="auto"><br>
    </div>
    <div dir="auto">So that mean we are comparing 3.24 to 3.26 with same
      level of read optimisation and that does not change the fact that,
      for that very same level of read optimisation, project's loading
      is incredibly  slower in 3.26.<br>
    </div>
    <div dir="auto"><br>
    </div>
    <div dir="auto"><br>
    </div>
    Le 20/06/2022 à 15:10, Nyall Dawson a écrit :<br>
    <blockquote type="cite"
cite="mid:CAB28AsicyK=Ndr8LvTP8jp0qZPTOfECZ_abdOFOe-oHs6BeHvA@mail.gmail.com">
      <div dir="auto">
        <div><br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Mon, 20 June 2022, 9:37
              pm David Marteau via QGIS-Developer, <<a
                href="mailto:qgis-developer@lists.osgeo.org"
                moz-do-not-send="true" class="moz-txt-link-freetext">qgis-developer@lists.osgeo.org</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote">
              <div>
                <p>Hi,</p>
                <p>I have noticed a huge drop of performance while
                  testing Qgis server with Qgis 3.26, from 10x to 30x
                  slower as usual.</p>
                <p>Trying to reduce the problem I have found a huge
                  increase of time spend reading the project in 3.26
                  compared to 3.24.</p>
                <p>Here some benchmark with very simple project from the
                  test data set. Note: the project has been updated with
                  qgis 3.26:</p>
                <p>Qgis 3.24:<br>
                  ======<br>
                </p>
                <div>
                  <div aria-label="Edit code here">
                    <div>
                      <div><textarea></textarea></div>
                      <div>
                        <div>
                          <div>
                            <div role="presentation">
                              <div role="presentation">
                                <div role="presentation">
                                  <pre role="presentation"><span role="presentation"><span>readflags</span> <span>=</span> <span>QgsProject</span>.<span>ReadFlags</span>()<span>
readflags</span> <span>|=</span> <span>QgsProject</span>.<span>FlagTrustLayerMetadata</span></span></pre>
                                  <pre role="presentation"><span role="presentation"><span></span><span>prj</span> <span>=</span> <span>QgsProject</span>()</span></pre>
                                  <pre role="presentation"><span role="presentation"><span>%</span><span>timeit</span> <span>-</span><span>n</span> <span>1</span> <span>prj</span>.<span>read</span>(<span>f"</span>{<span>datapath</span>}<span>/france_parts.qgs"</span>,<span>readflags</span>)</span></pre>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
                <div dir="auto">
                  <pre>> 15.7 ms ± 205 µs per loop (mean ± std. dev. of 7 runs, 1 loop each)
</pre>
                </div>
                <p>Qgis 3.26:<br>
                  ======</p>
                <div role="presentation">
                  <pre role="presentation"><span role="presentation"><span>readflags</span> <span>=</span> <span>QgsProject</span>.<span>ReadFlags</span>()
<span>readflags</span> <span>|=</span> <span>QgsProject</span>.<span>FlagTrustLayerMetadata</span></span></pre>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">You should set the other new read optimisation
          flags here -- see <a
href="https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://github.com/qgis/QGIS/blob/88ebb3f2f513dbce5a775f50e51ea0117f859c65/src/core/qgis.h#L1962</a></div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Nyall</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote">
              <div>
                <div role="presentation">
                  <pre role="presentation"><span role="presentation"><span>​</span><span>prj</span> <span>=</span> <span>QgsProject</span>()</span></pre>
                  <pre role="presentation"><span role="presentation"><span>%</span><span>timeit</span> <span>-</span><span>n</span> <span>1</span> <span>prj</span>.<span>read</span>(<span>f"</span>{<span>datapath</span>}<span>/france_parts.qgs"</span>,<span>readflags</span>)</span></pre>
                </div>
                <div dir="auto">
                  <pre>195 ms ± 44 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
</pre>
                  <p>There is a factor x10 between Qgis 3.24 et Qgis
                    3.26 for the exact same project. <br>
                    This has serious impact on requests: landing page
                    catalog request time increased from approximatevely
                    110ms to more than 3.0s with our test data set.</p>
                  <br>
                </div>
                <div>
                  <p> <span>David Marteau</span> <br>
                    <a href="http://www.3liz.com" target="_blank"
                      rel="noreferrer" moz-do-not-send="true">www.3liz.com</a>
                    <br>
                    <span> </span> </p>
                </div>
              </div>
              _______________________________________________<br>
              QGIS-Developer mailing list<br>
              <a href="mailto:QGIS-Developer@lists.osgeo.org"
                target="_blank" rel="noreferrer" moz-do-not-send="true"
                class="moz-txt-link-freetext">QGIS-Developer@lists.osgeo.org</a><br>
              List info: <a
                href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
              Unsubscribe: <a
                href="https://lists.osgeo.org/mailman/listinfo/qgis-developer"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
            </blockquote>
          </div>
        </div>
      </div>
    </blockquote>
  </body>
</html>