Skip to content

Conversation

@mattosaurus
Copy link
Owner

No description provided.

Removed PipeStreamContentsAsync and PipeStreamContents methods, replacing them with direct calls to CopyToAsync and CopyTo. This simplifies the code, enhances readability, and may improve performance.
@mattosaurus mattosaurus requested a review from Copilot June 2, 2025 20:40
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds performance-oriented updates by guiding users to disable armouring for large files and streamlining internal data piping.

  • Introduces a “Performance” section in README.md on disabling armouring.
  • Replaces custom PipeStreamContents helpers with Stream.CopyTo/CopyToAsync.
  • Removes buffer-based overloads and associated helper methods from Utilities.cs.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
README.md Added a performance section explaining how to disable armouring
PgpCore/Helpers/Utilities.cs Swapped manual buffer loops for built-in CopyTo methods and removed unused helpers and overloads
Comments suppressed due to low confidence (2)

PgpCore/Helpers/Utilities.cs:384

  • Add or update unit tests to verify that CopyToAsync correctly handles the full range of input sizes and edge cases, matching the previous behavior of custom buffering.
await input.CopyToAsync(pOut);

PgpCore/Helpers/Utilities.cs:395

  • Removing the public overloads that accept a custom buffer is a breaking change; consider marking this as deprecated or bumping the major version to alert consumers.
public static async Task WriteStreamToLiteralDataAsync(

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2025

@mattosaurus mattosaurus merged commit 6c448ae into master Jun 2, 2025
4 checks passed
@mattosaurus mattosaurus deleted the feature/performance-updates branch June 2, 2025 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants