-
Notifications
You must be signed in to change notification settings - Fork 0
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
fix: Improved memory usage #21
Conversation
…ved file byte array read
…re-read before saving it to blob storage
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.
LGTM
BlobStorageResponse blobStorageResponse; | ||
|
||
ReceiptBlobClientImpl blobClient = ReceiptBlobClientImpl.getInstance(); | ||
|
||
//Save to Blob Storage | ||
try { | ||
blobStorageResponse = blobClient.savePdfToBlobStorage(pdfEngineResponse.getPdf(), pdfFileName); | ||
File tempPdf = new File(TEMP_FILE_PATH); |
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.
Does it work well with concurrency ?
…cted folder) and deletion
… - improved exceptions logging
…n on temp directory existence
This pull request does not contain a valid label. Please add one of the following labels: |
Comment this PR with update_code to update |
SonarCloud Quality Gate failed.
|
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.
🚀 great
* [fix-improve-memory-usage] Managed the closure of input streams that remained open * [fix-improve-memory-usage] Sending zip template as InputStream - removed file byte array read * [fix-improve-memory-usage] Pdf-engine response saved to pdf file and re-read before saving it to blob storage * [fix-improve-memory-usage] Used temporary files with unique names for storing PDFs * [fix-improve-memory-usage] Manual delete of temp file * [fix-improve-memory-usage] To be deleted file to commit temp folder * [fix-improve-memory-usage] Deleted test pdf file * [fix-improve-memory-usage] Improved temp files generation (with protected folder) and deletion * [fix-improve-memory-usage] Improved test coverage and testing with temp files * [fix-improve-memory-usage] Deleted file used to commit temp folder * [fix-improve-memory-usage] Added temp directory creation and deletion - improved exceptions logging * [fix-improve-memory-usage] Extracted save temp file method - condition on temp directory existence
List of Changes
Motivation and Context
Fix memory problems
Types of changes