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

Prevent memory allocation during scaleAddOffset if it's unneeded #72

Merged
merged 1 commit into from
May 4, 2022

Conversation

ChrisPJohn
Copy link
Collaborator

I looked everywhere this is used and generally the result of the call is used to overwrite the PA that is provided as a parameter, so returning the same PA is not an issue.

During EDDGridFromNcFiles.testBigRequestSpeed this prevents the unnecesary allocation of multiple 37324800 item PrimitiveArrays which will reduce the need for garbage collection.

I looked everywhere this is used and generally the result of the call is used to overwrite the PA that is provided as a parameter, so returning the same PA is not an issue.

During EDDGridFromNcFiles.testBigRequestSpeed this prevents the unnecesary allocation of multiple 37324800 item PrimitiveArrays which will reduce the need for garbage collection.
@BobSimons BobSimons merged commit 0d28f50 into ERDDAP:master May 4, 2022
@BobSimons
Copy link
Collaborator

BobSimons commented May 6, 2022 via email

BobSimons pushed a commit that referenced this pull request May 13, 2022
@ChrisPJohn ChrisPJohn deleted the scaleAddOffsettHeapSavings branch February 9, 2023 19:52
ChrisJohnNOAA pushed a commit to ChrisJohnNOAA/erddap that referenced this pull request Apr 28, 2023
Prevent memory allocation during scaleAddOffset if it's unneeded
ChrisJohnNOAA pushed a commit to ChrisJohnNOAA/erddap that referenced this pull request Apr 28, 2023
ChrisJohnNOAA pushed a commit that referenced this pull request Jun 1, 2023
Prevent memory allocation during scaleAddOffset if it's unneeded
ChrisJohnNOAA pushed a commit that referenced this pull request Jun 1, 2023
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