Title: Start-Job is now 6-10x slower, and does not preserve $env:PSModulePath · Issue #7402 · PowerShell/PowerShell · GitHub
Open Graph Title: Start-Job is now 6-10x slower, and does not preserve $env:PSModulePath · Issue #7402 · PowerShell/PowerShell
X Title: Start-Job is now 6-10x slower, and does not preserve $env:PSModulePath · Issue #7402 · PowerShell/PowerShell
Description: Steps to reproduce $iter = 10 $env:PSModulePath = 'Custom PSModulePath' Measure-Command { for( $i = 0; $i -lt $iter; $i++ ) { $job = start-job -ScriptBlock { Write-Host $env:PSModulePath } } } Expected behavior I should be able to kick o...
Open Graph Description: Steps to reproduce $iter = 10 $env:PSModulePath = 'Custom PSModulePath' Measure-Command { for( $i = 0; $i -lt $iter; $i++ ) { $job = start-job -ScriptBlock { Write-Host $env:PSModulePath } } } Expe...
X Description: Steps to reproduce $iter = 10 $env:PSModulePath = 'Custom PSModulePath' Measure-Command { for( $i = 0; $i -lt $iter; $i++ ) { $job = start-job -ScriptBlock { Write-Host $env:PSModulePath } ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/7402
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Start-Job is now 6-10x slower, and does not preserve $env:PSModulePath","articleBody":"\u003c!--\r\n\r\nFor Windows PowerShell 5.1 issues, suggestions, or feature requests please use the following link instead:\r\n- Windows PowerShell [UserVoice](https://windowsserver.uservoice.com/forums/301869-powershell)\r\n\r\nIf it is a bug report:\r\n- make sure you are able to repro it on the latest released version. \r\nYou can install the latest version from https://github.com/PowerShell/PowerShell/releases\r\n- Search the existing issues.\r\n- Refer to the [FAQ](https://github.com/PowerShell/PowerShell/blob/master/docs/FAQ.md).\r\n- Refer to the [known issues](https://docs.microsoft.com/powershell/scripting/whats-new/known-issues-ps6?view=powershell-6).\r\n- Fill out the following repro template:\r\n\r\nIf it's not a bug, please remove the template and elaborate the issue in your own words.\r\n--\u003e\r\n\r\nSteps to reproduce\r\n------------------\r\n\r\n```powershell\r\n$iter = 10\r\n$env:PSModulePath = 'Custom PSModulePath'\r\n\r\nMeasure-Command {\r\n for( $i = 0; $i -lt $iter; $i++ )\r\n {\r\n $job = start-job -ScriptBlock { Write-Host $env:PSModulePath }\r\n }\r\n}\r\n```\r\n\r\nExpected behavior\r\n-----------------\r\nI should be able to kick off ten jobs in just a few seconds (maybe 2 or 3). When the results of the job come in, I should see `Custom PSModulePath`. This is the behavior in 5.1.\r\n\r\nActual behavior\r\n---------------\r\nIt takes between 12 and 20 seconds. That's longer than a second per job! (and I'm not waiting for the job to finish; this is just the time for `Start-Job` to return) And then the output is the default module path.\r\n\r\nEnvironment data\r\n----------------\r\n\r\n\u003c!-- provide the output of $PSVersionTable --\u003e\r\n\r\n```powershell\r\n\u003e $PSVersionTable\r\nName Value\r\n---- -----\r\nPSVersion 6.1.0-preview.4\r\nPSEdition Core\r\nGitCommitId 6.1.0-preview.4-26-g668ce91ddb14d71177b4de4f94d99c3e429e4ff7\r\nOS Microsoft Windows 10.0.17692\r\nPlatform Win32NT\r\nPSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}\r\nPSRemotingProtocolVersion 2.3\r\nSerializationVersion 1.1.0.1\r\nWSManStackVersion 3.0\r\n```\r\n","author":{"url":"https://github.com/jazzdelightsme","@type":"Person","name":"jazzdelightsme"},"datePublished":"2018-07-30T05:57:51.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":13},"url":"https://github.com/7402/PowerShell/issues/7402"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f80ec5c7-118d-386a-27aa-27aa77d1fbdf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A996:237DC:2C5AB9B:40151F9:6A551A97 |
| html-safe-nonce | 81811436268fbc9a6caefc76ed215360a3785feb54e6bae99881d302d34891a0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOTk2OjIzN0RDOjJDNUFCOUI6NDAxNTFGOTo2QTU1MUE5NyIsInZpc2l0b3JfaWQiOiI5MTYyMjYwMjAzMTE0NDA0NTAzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 56df74fd0736c4815931e36dceb498da4978be8e391180c21afb43823b562c3b |
| hovercard-subject-tag | issue:345621267 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/7402/issue_layout |
| twitter:image | https://opengraph.githubassets.com/078be6b355f305c0020c5b5df3ba741bdec3dc3cbccadef56aac079507331349/PowerShell/PowerShell/issues/7402 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/078be6b355f305c0020c5b5df3ba741bdec3dc3cbccadef56aac079507331349/PowerShell/PowerShell/issues/7402 |
| og:image:alt | Steps to reproduce $iter = 10 $env:PSModulePath = 'Custom PSModulePath' Measure-Command { for( $i = 0; $i -lt $iter; $i++ ) { $job = start-job -ScriptBlock { Write-Host $env:PSModulePath } } } Expe... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | jazzdelightsme |
| hostname | github.com |
| expected-hostname | github.com |
| None | 682d273eacb2ac51680c6eb9c0b270f029f7ce74c32090f319083c34497e28a5 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3b6d37c6470adadff4194742daaab9a817cc4980 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width