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

Draft: Introduce get_data_memoryview() for copy-free access to resource data #557

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

alchzh
Copy link
Collaborator

@alchzh alchzh commented Jan 3, 2025

One sentence summary of this PR (This should go in the CHANGELOG!)
Introduce get_data_memoryview() for copy-free access to resource data

Link to Related Issue(s)
#551

Please describe the changes in your request.

  • Adds get_data_memoryview() to data service and Resource to get a copy-free view of a resource's data
  • Changes many built in components to use get_data_memoryview() instead of get_data()
  • Changes magic component to pass memoryview as buffer directly

Anyone you think should look at this, specifically?

@alchzh alchzh requested a review from rbs-jacob January 3, 2025 21:02
@alchzh alchzh self-assigned this Jan 3, 2025
@alchzh
Copy link
Collaborator Author

alchzh commented Jan 6, 2025

In theory this change should give neat memory consumption savings for certain workloads, would be interested in making benchmarks that test that

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.

1 participant