Skip to content

Conversation

@mrxz
Copy link
Contributor

@mrxz mrxz commented Feb 15, 2024

Description:
Noticed that that AFRAME.utils.entity.getComponentPropertyPath didn't properly use its cache. It constructed a cache and populated it, but never checked if strings were already cached. Meaning it would always recompute (= split), place in cache and then immediately return that value from the cache.

This PR simply replaces the broken caching mechanism with AFRAME.utils.split, since the split utility also uses a cache internally. Added benefit is that the cache is now also shared between the two.

Changes proposed:

  • Fix property path caching by using AFRAME.utils.split which internally caches
@dmarcos
Copy link
Member

dmarcos commented Feb 17, 2024

Thanks!

@dmarcos dmarcos merged commit 32f5370 into aframevr:master Feb 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants