{"action":"opened","issue":{"url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7124","repository_url":"https://api.github.com/repos/PowerShell/PowerShell","labels_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7124/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7124/comments","events_url":"https://api.github.com/repos/PowerShell/PowerShell/issues/7124/events","html_url":"https://github.com/PowerShell/PowerShell/issues/7124","id":334299286,"node_id":"MDU6SXNzdWUzMzQyOTkyODY=","number":7124,"title":"Possible performance enhancement with Write-* cmdlets","user":{"login":"KirkMunro","id":3515485,"node_id":"MDQ6VXNlcjM1MTU0ODU=","avatar_url":"https://avatars3.githubusercontent.com/u/3515485?v=4","gravatar_id":"","url":"https://api.github.com/users/KirkMunro","html_url":"https://github.com/KirkMunro","followers_url":"https://api.github.com/users/KirkMunro/followers","following_url":"https://api.github.com/users/KirkMunro/following{/other_user}","gists_url":"https://api.github.com/users/KirkMunro/gists{/gist_id}","starred_url":"https://api.github.com/users/KirkMunro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KirkMunro/subscriptions","organizations_url":"https://api.github.com/users/KirkMunro/orgs","repos_url":"https://api.github.com/users/KirkMunro/repos","events_url":"https://api.github.com/users/KirkMunro/events{/privacy}","received_events_url":"https://api.github.com/users/KirkMunro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-06-21T00:57:13Z","updated_at":"2018-06-21T00:57:13Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is more of a question than an issue at this point.\r\n\r\nI wonder if PowerShell could invoke Write-_Stream_ (Write-Verbose, Write-Debug, etc.) commands differently, still performing parse checking on scripts containing those commands to make sure they parse properly, but not actually invoking those commands unless the preference variable is appropriately configured or the parameter to make that stream's output show up was used directly or via $PSDefaultParameterValues.\r\n\r\nFor example, `Write-Verbose -Message 'Hello' -Verbose` would be invoked, but `Write-Debug -Message $(Get-Service | Format-List * | Out-String)` would not, unless $DebugPreference was set to something other than SilentlyContinue or Ignore).\r\n\r\nFor anyone familiar with the details surrounding how PowerShell executes commands, can someone comment on the feasibility/possibility of skipping commands that should be skipped as a way to optimize script performance? It's not hard to see how it could make a big difference, while encouraging broader use of Write-Verbose and Write-Debug at the same time (for the latter, especially if #7122 gets implemented)."}}
{"actor":{"display_login":"KirkMunro"}}