Skip to content
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

Look for use cases for $input #65

Open
IMJLA opened this issue May 26, 2024 · 2 comments
Open

Look for use cases for $input #65

IMJLA opened this issue May 26, 2024 · 2 comments
Labels
enhancement-performance improve performance without sacrificing functionality

Comments

@IMJLA
Copy link
Owner

IMJLA commented May 26, 2024

$input is ancient PowerShell v1

In a scriptblock it contains every input to the scriptblock at that point in time

in the end block, $input contains every input

It is faster than accumulating input in the process block

Watch Out: $input can only be read once

@IMJLA IMJLA added the enhancement-performance improve performance without sacrificing functionality label May 26, 2024
@IMJLA
Copy link
Owner Author

IMJLA commented May 26, 2024

suspected use case in PsRunspace module

@IMJLA
Copy link
Owner Author

IMJLA commented May 26, 2024

Implemented in Split-Thread only due to simplest direct replacement

Need to evaluate impact to see if it is worth rearchitecting any other functions to take advantage of the perf improvement

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement-performance improve performance without sacrificing functionality
Projects
None yet
Development

No branches or pull requests

1 participant