Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

List<byte> initial size #182

Open
MV10 opened this issue Sep 15, 2020 · 0 comments
Open

List<byte> initial size #182

MV10 opened this issue Sep 15, 2020 · 0 comments

Comments

@MV10
Copy link
Collaborator

MV10 commented Sep 15, 2020

The library uses List<byte> buffers and I believe the List<T> default constructor only allocates enough space for 10 entries. Given the size of MMAL buffers and camera frames, we should investigate whether there is any benefit to allocating a much larger size in the constructor.

Edit: Additionally, the default behavior is to double the capacity each time the limit is reached. Each list potentially allocates up to twice as much memory as it actually needs.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant