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

perf: reduce memory allocations #81

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jonathan-mayer
Copy link
Member

Motivation

This PR aims to reduce memory reallocations by refactoring for loops which append to slices to resize the underlying array where ever possible.
Additionally it removes unnecessary temporary copies in the get resource functions.

This is in theory slightly going to improve performance and efficiency. It wouldn't hurt to go over the whole project and try to find more places where memory allocations could be avoided. That's a lot of work though and its not like the downscaler has performance issues so it would just be a nice to have.

Changes

Tests done

  • unit tests passed

TODO

@jonathan-mayer jonathan-mayer added the housekeeping A change that cleans or updates the repository. label Jan 9, 2025
@jonathan-mayer jonathan-mayer self-assigned this Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
housekeeping A change that cleans or updates the repository.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant