puppetlabs/puppet — pull request #1663 by joshcooper (2013-05-24 04:46:02+00:00)
Title: (#20787) Do not generate NetBIOS name service requests

Previously, we were constructing an ADSI connection uri using the local
computer name, e.g. 'WinNT://hostname/Administrator,user'. However, Windows
performs a NetBIOS name service request (NBNS), one request for each ADSI
connection, which is very slow when enumerating users and groups.

Simply using '.' to denote the local computer eliminates all NBNS
requests. This reduces the time to run `puppet resource user` from 198
seconds to 3.1 seconds for 39 users, and from 98 seconds to 2.8 seconds for
16 groups.

Note we still have to use the fully qualified uri when adding/removing
users from a group, though it does not result in NBNS requests.