Skip to content

Conversation

@mrxz
Copy link
Contributor

@mrxz mrxz commented Feb 12, 2024

Description:
Throughout the code base both the native Function.prototype.bind and a custom AFRAME.utils.bind are used (about 50-50). The latter was introduced as a faster alternative (#1762). However, it seems that this is no longer the case and in fact performs worse:

This PR removes it and introduces a small wrapper of the native bind in the place of AFRAME.utils.bind to avoid breaking any third party code using this utility, while still given them the same perf benefit from switching to native bind.

Changes proposed:

  • Replace usages of utils/bind with native bind
  • Introduce wrapper for AFRAME.utils.bind that uses native bind

@dmarcos
Copy link
Member

dmarcos commented Feb 13, 2024

Thanks

@dmarcos dmarcos merged commit bc3461e into aframevr:master Feb 13, 2024
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

Successfully merging this pull request may close these issues.

2 participants