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

Robot module/components IEnum->array #345

Merged
merged 4 commits into from
Jun 18, 2021
Merged

Robot module/components IEnum->array #345

merged 4 commits into from
Jun 18, 2021

Conversation

MikeJeffers
Copy link

Because every update loop updates every robot, which updates every module on every robotcomponent, the accessor the the underlying collection of modules and components is actually impactful.

Looping with IEnumerable is nice to defer the underlying query it may be built on. But if this is mostly static (for 99.999% of all update calls) then it would be wise to compute this and store it in an array.

The risk is that if the underlying collection (entity children) are manipulated not using the correct interface/public methods then the lazy-initializer (as the resetting mechanism to the collection) might become inconsistent. But this is why we have reviews and testing right? :)

@MikeJeffers MikeJeffers added the enhancement New feature or request label Jun 8, 2021
@MikeJeffers MikeJeffers self-assigned this Jun 8, 2021
@MikeJeffers MikeJeffers added performance and removed enhancement New feature or request labels Jun 13, 2021
@MikeJeffers MikeJeffers merged commit 12e8edb into Development Jun 18, 2021
@MikeJeffers MikeJeffers deleted the optims-misc branch June 18, 2021 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant