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

BillboardCollection allocates DrawCommand too often #550

Closed
pjcozzi opened this issue Mar 7, 2013 · 0 comments
Closed

BillboardCollection allocates DrawCommand too often #550

pjcozzi opened this issue Mar 7, 2013 · 0 comments
Labels

Comments

@pjcozzi
Copy link
Contributor

pjcozzi commented Mar 7, 2013

BillboardCollection should cache DrawCommand objects likeEllipsoidPrimitive. Currently, even if the primitive doesn't change, update() still allocates new DrawCommand objects.

We should go through all the primitives and make sure these unnecessary allocations are not happening.

@ghost ghost assigned bagnell Mar 7, 2013
mramato added a commit that referenced this issue Mar 8, 2013
Addressed issue #550

This seemed easy enough so I took a stab at it.  I kept it simple so we cache only as many as we need and discard them when we don't.
We could have a separte pool (or a generic ObjectPool) implementation if we want something more sphisticated, but I wasn't sure if the overhead was worth it.

What do you think @pjcozzi ?
@pjcozzi pjcozzi closed this as completed Mar 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants