<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Performance regression in git compared 2.11"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94427#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Performance regression in git compared 2.11"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=94427">bug 94427</a>
              from <span class="vcard"><a class="email" href="mailto:fontconfigbugs@uninformativ.de" title="Peter <fontconfigbugs@uninformativ.de>"> <span class="fn">Peter</span></a>
</span></b>
        <pre>To be more precise, the commit mentioned above adds a call to FcDirScanOnly()
which causes all the stat() calls Antonio has seen. FcDirScanOnly() will
*always* be called, even if the cache turns out to be perfectly valid.

To give you some more numbers, a "time fc-list" in a terminal went from ~30ms
with fontconfig 2.11.1 to ~200ms with fontconfig 2.11.94. As a result,
seemingly "simple" applications like dmenu show a noticeable lag on startup.
I'm on an i7-3770 with 32GB RAM, so neither CPU speed nor the size of IO cache
should be an issue here.

I'm not familiar with fontconfig's code, but I noticed that FcCacheDirsValid()
gets called 18 times. Is that neccessary? I added some ugly static variables to
make fontconfig "cache" the first return value of FcCacheDirsValid() and I'm
back at my ~30ms. Thus, *one* call to FcDirScanOnly() is just fine.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>