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

Object pool cleanup #81

Open
Nelarius opened this issue Jan 27, 2021 · 0 comments
Open

Object pool cleanup #81

Nelarius opened this issue Jan 27, 2021 · 0 comments

Comments

@Nelarius
Copy link
Owner

Nelarius commented Jan 27, 2021

Primary concerns

Iterating over all nodes, both used and unused, seems to cause continuous issues due to the complicated logic in the object pool and free list usage: #71, #59, #58

We should only iterate over the nodes which have actually been submitted this frame. We already maintain the list of submitted node indices, so it could be used for this purpose as well.

Once this is done, this commit can be reverted: f1bda72.

Secondary concerns

  1. ObjectPool::free_list is updated every frame. It should be enough to add the free slot once to the list and retain it.
  2. ObjectPool::in_use is not needed, if we can compare the submission indices of this frame and the previous frame.
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

No branches or pull requests

1 participant