Skip to content

Conversation

@ngokevin
Copy link
Member

@ngokevin ngokevin commented Aug 8, 2017

Description:

Doing a performance profile on allocations using that in-VR perf demo, I found vecParseFloat was the 2nd biggest object allocator, and vecParse was the 6th biggest object allocator. Seems right given how often setAttribute on a vec3 is called, although I would've though skipTypeChecking should've prevented these calls at all.

Changes proposed:

  • In vecParseFloat, don't create an Array (Object.keys) and callback. Don't need to call parseFloat on a number.
  • In vecParse, move an object allocation down to only when it's needed (string parsing). And save an object allocation by modifying existing object.

@dmarcos dmarcos merged commit 0431e25 into aframevr:master Aug 9, 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