-
Notifications
You must be signed in to change notification settings - Fork 234
Variable Expansion: ScriptProperty ToStrings are slow to perform #1686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@SeeminglyScience looks like it's not hard-hanging, just a performance issue. Could this have to do with the marshaling still? Capture.mp4 |
Narrowed it down to this loop for enumerables that is "slow", I'll dig deeper into Lines 338 to 344 in 624fe30
|
Yep! In certain circumstances (like this one) it will timeout after 250ms and then just invoke it anyway from a different thread (while still targeting the same runspace) potentially causing state corruption. So I'd say that still perfectly explains it and potentially makes it a little bit more scary. |
Here's the culprit: Line 198 in 624fe30
If you set it to null instead of |
More specifically:
@SeeminglyScience how would I get this obj.ToString() method on the correct invocation? It does feel like about a 250ms delay on each invocation. |
Adding @SeeminglyScience as I've hit my limits on figuring this out for now :) |
And fixed, with your test too! |
Per @SeeminglyScience it's probably because the ToString is trying to marshal to the pipeline thread and deadlocking.
The text was updated successfully, but these errors were encountered: