<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - systemctl is-enabled scales poorly with many units"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72611#c7">Comment # 7</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - systemctl is-enabled scales poorly with many units"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=72611">bug 72611</a>
              from <span class="vcard"><a class="email" href="mailto:david@davidstrauss.net" title="David Strauss <david@davidstrauss.net>"> <span class="fn">David Strauss</span></a>
</span></b>
        <pre>Okay, so I think I understand the issue now. If you have a ton of units, and
they're mostly enabled, checking is-enabled scales O(2*n).

Here's the problematic path in our case, with units in /etc/systemd/system:
 (1) find_symlinks_fd() iterates through everything in /etc/systemd/system
 (2) When we find the multi-user.target.wants directory, we recursively call
find_symlinks_fd() on it.
 (3) We look for symlinks back to the unit.

This isn't at all unique to recent systemd versions; it's just a new problem
we're seeing with our increasing scale.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the QA Contact for the bug.</li>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>