FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Use AFRAME.utils.split in getComponentPropertyPath fixing caching behaviour by mrxz · Pull Request #5467 · aframevr/aframe · GitHub

Use AFRAME.utils.split in getComponentPropertyPath fixing caching behaviour - #5467

Merged
dmarcos merged 1 commit into
aframevr:masterfrom
mrxz:fix-property-path-cache
Feb 17, 2024
Merged

Use AFRAME.utils.split in getComponentPropertyPath fixing caching behaviour#5467
dmarcos merged 1 commit into
aframevr:masterfrom
mrxz:fix-property-path-cache

Conversation

mrxz commented Feb 15, 2024

Copy link
Copy Markdown
Contributor

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 commented Feb 17, 2024

Copy link
Copy Markdown
Member

Thanks!

dmarcos merged commit 32f5370 into aframevr:master Feb 17, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL