<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Dear Tobias,<br>
    <br>
    Thank you for taking the time to test. Are you sure you have built
    with usrinst.sh options adjusted to switch to release optimizations?<br>
    <br>
    Also, I wanted to mention that the cache is built upon the first
    scan of the files in the folder. I am not sure what your test
    program does, but have a look for a modules-conf.cache file in your
    mods.d/ folder to see if your next SWMgr construction will benefit
    from the cache. For the remote repositories on your desktop, these
    should live under your home folder/.sword/installMgr/...<br>
    <br>
    I'll do a few more tests today to see if there is anything else I
    can speed up. It is good to hear things improved from SVN before my
    recent changes. We should do a profiling pass before a new stable
    branch to be sure we haven't done anything silly over the past year
    which affects performance.<br>
    <br>
    Let me know if you discover any new info,<br>
    <br>
    Troy<br>
    <br>
    <div class="gmail_quote">On November 4, 2022 10:25:14 AM MST, Tobias
      Klein <a class="moz-txt-link-rfc2396E" href="mailto:contact@tklein.info"><contact@tklein.info></a> wrote:
      <blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex;
        border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
        <p>Hi Troy,<br>
          <br>
          Thanks for looking into this!<br>
        </p>
        <p>Just running this on my Dev PC (Linux, SSD disk, Intel i7) I
          am actually noticing a degradation with this change ... but
          only at first sight and compared to the SWORD version I have
          been using before.</p>
        <p>I am running this function within a test binary.<br>
          <a class="moz-txt-link-freetext"
href="https://github.com/ezra-bible-app/node-sword-interface/blob/1.0.0/src/sword_backend/repository_interface.cpp#L300">https://github.com/ezra-bible-app/node-sword-interface/blob/1.0.0/src/sword_backend/repository_interface.cpp#L300</a><br>
          <br>
          I previously used SVN Rev. 3873 (which is from Nov. 2021).<br>
          With that revision my test binary takes 1.65s to execute.</p>
        <p>After switching to SVN Rev. 3887 (HEAD) the test binary takes
          1.95 seconds to execute, so roughly 300ms slower.</p>
        <p>To be sure, I also tested with the SVN Rev. preceding your
          latest changes (3883) and this was a surprise: With that the
          test binary takes 2.9s to execute.<br>
          <br>
          So ... compared to SVN Rev. 3883 your latest changes were
          actually a significant performance improvement ... but
          compared to the version from one year ago (which is my
          production version) it is slower.<br>
          <br>
          So something else must have changed in the last 12 months that
          impacts performance?!</p>
        <p>Best regards,<br>
          Tobias<br>
        </p>
        <div class="moz-cite-prefix">On 11/4/22 12:13 AM, Troy A.
          Griffitts wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:59f1d52b-4902-c560-d3eb-e0656fc7db49@crosswire.org">
          <meta http-equiv="Content-Type" content="text/html;
            charset=UTF-8">
          <p>OK Tobias,</p>
          <p>I have a first cut of a caching mechanism for a mods.d/
            folder coded up and pushed to trunk.  I have attempted to
            remove the cache when the folder is changed (= new module is
            installed or removed), but I possibly have forgotten
            something.  Give it a go and let me know if it improves
            things for you on your slower devices and we'll go from
            there.</p>
          <p>Troy</p>
          <p><br>
          </p>
          <div class="moz-cite-prefix">On 11/3/22 12:05, Tobias Klein
            wrote:<br>
          </div>
          <blockquote type="cite"
            cite="mid:add71ec2-f3be-0cc8-4214-54841c00c6de@tklein.info">
            <meta http-equiv="Content-Type" content="text/html;
              charset=UTF-8">
            <p>Thank you, Troy!</p>
            <p>I'd be glad to test any changes you come up with!<br>
              <br>
              Best regards,<br>
              Tobias<br>
            </p>
            <div class="moz-cite-prefix">On 11/3/22 5:57 PM, Troy A.
              Griffitts wrote:<br>
            </div>
            <blockquote type="cite"
              cite="mid:a01a002c-daf4-731d-74f2-dd9afd82db93@crosswire.org">
              <meta http-equiv="Content-Type" content="text/html;
                charset=UTF-8">
              <p>Dear Tobias,</p>
              <p>I can have a look at optimizing getModuleStatus.  I can
                certainly see that only checking locally installed
                modules might be a speed improvement, but I suspect most
                of the time is loading all the .conf files for each
                module, and that is done when constructing the SWMgr
                (remote and local).  SWORD previously worked with a
                single modules.conf file where the section was appended
                each time a module was loaded.  It still will work in
                this manner.  I might try dumping all the .conf files
                into a single cache.conf file and using that for reading
                the info of a remote repository-- which can include
                thousands of individual .conf files.  We can see if that
                speeds up this operation.<br>
              </p>
              <div class="moz-cite-prefix">On 10/30/22 08:49, Tobias
                Klein wrote:<br>
              </div>
              <blockquote type="cite"
                cite="mid:E1opAZH-0004TO-7W@smtprelay06.ispgateway.de">
                <meta http-equiv="Content-Type" content="text/html;
                  charset=UTF-8">
                <meta name="Generator" content="Microsoft Word 15
                  (filtered medium)">
                <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}span.pl-k
        {mso-style-name:pl-k;}.MsoChpDefault
        {mso-style-type:export-only;}div.WordSection1
        {page:WordSection1;}</style>
                <div class="WordSection1">
                  <p class="MsoNormal"><span lang="EN-US">Hi Troy,<o:p></o:p></span></p>
                  <p class="MsoNormal"><o:p> </o:p></p>
                  <p class="MsoNormal">When integrating the module
                    update functionality in Ezra Bible App, I noticed a
                    performance issue in the function <span
style="font-size:9.0pt;font-family:Consolas;color:#D2A8FF;background:#0D1117">InstallMgr::getModuleStatus</span>.</p>
                  <p class="MsoNormal"><o:p> </o:p></p>
                  <p class="MsoNormal">On my laptop, it takes almost two
                    seconds to run this against all repositories from
                    the master repo list. On my slower surface tablet,
                    it takes even longer and I haven’t tested it on my
                    even slower Android devices, yet. This generates a
                    bit of an issue in my JavaScript based application
                    (longer interrupts of the JavaScript event loop lead
                    to some freezing in the UI).</p>
                  <p class="MsoNormal"><o:p> </o:p></p>
                  <p class="MsoNormal">Considering the parameters <span
                      class="pl-k"><span
style="font-size:9.0pt;font-family:Consolas;color:white;background:#0D1117">const</span></span><span
style="font-size:9.0pt;font-family:Consolas;color:#C9D1D9;background:#0D1117">
                      SWMgr &base, </span><span class="pl-k"><span
style="font-size:9.0pt;font-family:Consolas;color:white;background:#0D1117">const</span></span><span
style="font-size:9.0pt;font-family:Consolas;color:#C9D1D9;background:#0D1117">
                      SWMgr &other</span>, I saw that the function
                    loops through all modules within <span
style="font-size:9.0pt;font-family:Consolas;color:#C9D1D9;background:#0D1117">other</span>.
                    If one just wants to see which local modules are
                    outdated, it would be enough to go through the ones
                    that are also present within <span
style="font-size:9.0pt;font-family:Consolas;color:#C9D1D9;background:#0D1117">base</span>,
                    right? Could that be a way of optimizing the
                    performance?<br>
                    <br>
                    Best regards,<br>
                    Tobias</p>
                </div>
                <br>
                <fieldset class="moz-mime-attachment-header"></fieldset>
                <pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
              </blockquote>
              <br>
              <fieldset class="mimeAttachmentHeader"></fieldset>
              <pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
            </blockquote>
            <br>
            <fieldset class="moz-mime-attachment-header"></fieldset>
            <pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sword-devel@crosswire.org" moz-do-not-send="true">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel" moz-do-not-send="true">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
          </blockquote>
          <br>
          <fieldset class="mimeAttachmentHeader"></fieldset>
          <pre class="moz-quote-pre" wrap="">_______________________________________________
sword-devel mailing list: <a class="moz-txt-link-abbreviated moz-txt-link-freetext" href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a>
<a class="moz-txt-link-freetext" href="http://crosswire.org/mailman/listinfo/sword-devel">http://crosswire.org/mailman/listinfo/sword-devel</a>
Instructions to unsubscribe/change your settings at above page
</pre>
        </blockquote>
      </blockquote>
    </div>
    <div style="white-space: pre-wrap"><div class="k9mail-signature">-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.</div></div>
  </body>
</html>