puppetlabs/puppet — pull request #1661 by joshcooper (2013-05-23 23:02:34+00:00)
Title: (#20787) Restrict ADSI query to the localhost

Previously, we were constructing an ADSI connection string using the local
computer name, e.g. WinNT://hostname/Administrator,user, but Windows makes a
NetBIOS request that times after 2-3 second for each user & group.

Simply using '.' to denote the local computer eliminates all network
requests, to \Device\Mup\hostname\MAILSLOT\NET\NETLOGON and
\Device\Mailslot\NET\GETDCXXX. 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.