Changed all the Powershell calls to the "echo" cmdlet to use "out-file" with the "-append" option instead #35
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a preliminary re-implementation of the
appendContent
function which usesout-file
with the-append
parameter instead ofecho
w/ a redirect. Usingecho
w/ a redirect will typically result in a unicode-type encoding which uses 16-bit wchar_t internally resulting in twice as much base64 encoded data needing to be decoded. By usingout-file
with a utf8 encoding, this should halve the base64 data that is written to the file which "might" make things a little faster. I think we can use 7-bit ascii due to base64, but to be safe I chose utf8 because it's universal.However, I believe the same amount of data is being transferred over a socket, but during the decoding process, less data needs to be processed. Also, to execute an i/o redirect the command has to be executed, have its output captured, a handle needs to be created for the file, data needs to be appended (a seek), and then the handle has to be closed. Using
out-file
keeps all functionality within the same implementation and doesn't need to process any of the extra features ofwrite-output
which supports different logging classes and other special formatting (which can have some implicit performance issues).This is based on the first suggestion I made in PR #6. It hasn't been tested too well, but should have the exact same semantics as the original implementation. I have not comprehensively measured its performance. :-/