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

Improve modeler.ReadAccessor buffer handling #88

Merged
merged 1 commit into from
Aug 28, 2024
Merged

Improve modeler.ReadAccessor buffer handling #88

merged 1 commit into from
Aug 28, 2024

Conversation

qmuntal
Copy link
Owner

@qmuntal qmuntal commented Aug 28, 2024

modeler.ReadAccessor now takes a []byte as the buffer parameter instead of any. It will internally cast that slice to the appropriate type and use it as backing memory when reading the accessor data.

This new approach has the advantage of allowing to reuse the same buffer for different accessor types. Previously, the buffer would only be used if the buffer type would match the accessor type.

Additionally, all the other modeler.Read* functions have been updated to pass a pooled buffer into modeler.ReadAccessor instead of the buffer passed by the caller.

@qmuntal qmuntal merged commit a9e4b38 into master Aug 28, 2024
14 checks passed
@qmuntal qmuntal deleted the buffers branch August 28, 2024 13:15
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