Issue #16581 has been updated by Josh Cooper.

Thanks David. I'm guessing here, but I think the WMI query is especially slow, 
because we're querying the base `Win32_Account` class, instead of 
`Win32_UserAccount` or `Win32_Group`. The reason is that we don't know ahead of 
time whether the file owner/group is a user or group. For example, the file 
owner can be a group, and the file group can be group. 

Another possibility is that WMI is retrieving the list of groups the user is a 
member of, even though we are restricting the query to just return the Sid 
attribute. In any case, I'll continue with performance work (replacing the WMI 
calls to use the native Win32 APIs). In the meantime, can you try the following 
code (both running as a domain user and local user). Hopefully the performance 
is about the same:

<pre>
require 'rubygems'
require 'win32/security'

puts Win32::Security::SID.new(&lt;username>).to_s
</pre>

Also, can you be sure to use version 0.1.4 of the win32-security gem
----------------------------------------
Bug #16581: Windows file permission management very slow
https://projects.puppetlabs.com/issues/16581#change-73733

Author: David Carr
Status: Accepted
Priority: Normal
Assignee: Josh Cooper
Category: windows
Target version: 2.7.20
Affected Puppet version: 2.7.6
Keywords: windows file permissions user group sid slow performance
Branch: 


I'm trying to write some Puppet manifests that support both Darwin and Windows. 
 So far, it's been going pretty well, but I noticed that my manifests were 
running much more slowly on Windows.  I believe that the majority of the 
slow-down is caused by File resources with owner/group/mode specified.  I'm 
able to reproduce a substantial performance difference between a manifest to 
create a single empty directory with/without permissions specified.  Manifests 
and output from "puppet apply --debug --verbose --no-daemonize --summarize 
--color=false --onetime MANIFEST" attached.  The machine I'm running these on 
is a Dell Latitude E6500 running Windows 7 64-bit with Puppet 3.0.0-rc7 
installed.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to