{"push_id":992486002,"size":1,"distinct_size":1,"ref":"refs/heads/ticket/master/MODULES-2962-reuse-powershell-session","head":"ccc5c66caa86a8dc2fe86f6af9ef79cdc858b94a","before":"83719ecdfac62679ffa468c4b7e179cdeb25d190","commits":[{"sha":"ccc5c66caa86a8dc2fe86f6af9ef79cdc858b94a","author":{"email":"116de0641111efe413710a3a48e857ac0af88d99@puppetlabs.com","name":"James Pogran"},"message":"(MODUlES-2962) Reuse PowerShell Session\n\nPort of the PowerShell session code from the DSC module. This code\nincludes some significant speed and system utilization improvements.\nIn the prior version every call to exec started a brand new PowerShell\nprocess for each of the exec modes: command, onlyif and unless. This\nwas costly in both time and system resources as PowerShell takes\nsignificant time to intialize and frequent process creations spike cpu\non the target system.\n\nIn this version, a single PowerShell process is created that lives not\nonly for all the modes of exec, but also for the entirety of the Puppet\nrun. We still have a one time cost of time and system utilization for\nprocess creation for the entire run, but gain the ability to run\nconsecutive commands.\n\nA second improvement to this version is that we directly pass commands\nto PowerShell through shell redirection, and not through reading a file\nin like the last version. This avoids any of the parsing errors\n(MODULES-2634) we have seen. This also improves syntax checking, as we\nnow validate the passed in commands using PowerShell itself before\nthe command is run, allowing us to catch errors sooner and report them.","distinct":true,"url":"https://api.github.com/repos/jpogran/puppetlabs-powershell/commits/ccc5c66caa86a8dc2fe86f6af9ef79cdc858b94a"}]}