Skip to content

Conversation

@ngokevin
Copy link
Member

@ngokevin ngokevin commented Aug 6, 2017

Description:

Changes proposed:

  • In tracked-controls/raycaster tick and component buildData, don't create inline functions (forEach, filter) nor use callbacks. Use simple for loop to try to reduce references that will need to get cleaned up by garbage collector.

@dmarcos
Copy link
Member

dmarcos commented Aug 6, 2017

I believe what you're doing is correct by my understanding on how lexical scoping and closures work in JS. I have not proof though that iterators are measurably worse since the JS interpreter I'm sure does optimizations under the hood to reduce or eliminate potential overhead. I think we can merge this because at worse it will be innocuous and we have good test coverage to detect regressions. We're also one month out from release and we will likely catch any bugs that the unit tests might miss.

@dmarcos dmarcos merged commit 50a9c73 into aframevr:master Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants