-
Notifications
You must be signed in to change notification settings - Fork 39
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
Improve performance when creating output zip payload #59
Improve performance when creating output zip payload #59
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix!
StoreBroker/PackageTool.ps1
Outdated
Write-Log "Writing submission request JSON file: [$OutFilePath]." -Level Verbose | ||
|
||
$JsonObject | | ||
ConvertTo-Json -Depth $script:jsonConversionDepth -Compress | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you indent these additional lines?
StoreBroker/PackageTool.ps1
Outdated
ConvertTo-Json -Depth $script:jsonConversionDepth -Compress | | ||
Out-File -Encoding utf8 -FilePath $OutFilePath | ||
|
||
Write-Log "Writing complete." -Level Verbose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wasn't there value in including the $OutFilePath
path in the log?
StoreBroker/PackageTool.ps1
Outdated
Write-Log "Writing merged JSON file: [$OutJsonPath]." -Level Verbose | ||
|
||
$outJsonContent | | ||
ConvertTo-Json -Depth $script:jsonConversionDepth -Compress | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you indent these lines?
destination. This gives better performance when the final destination is not on the local | ||
machine. | ||
|
||
The function uses no compression during the zip process, as we didn't see a noticeable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd update this comment (and the other one inside the method) to clarify that this is zipping appx/appxbundle/png files which themselves are already compressed. This wasn't a general statement on zip compression as a whole, simply for our specific use case.
…re moving to the destination. This provides better performance when the destination is on a remote machine. Additionally, add better logging so we can determine the time certain commands take to complete. Bump module version to 1.9.0
Improve performance when creating output zip payload.
We found there was a significant delay when creating the final zip output if the output path existed on a remote machine. We will change to compress the payload on the local machine before moving the output to the final destination.
In addition, added extra logging around commands that interact with the filesystem, so that future debugging will have an easier time determining the duration of the command.
Bumped the module version to 1.9.0