Revert "Entity path methods and bsn entity path resolving (#24018)"#24034
Merged
Conversation
urben1680
approved these changes
Apr 29, 2026
cart
approved these changes
Apr 29, 2026
tychedelia
pushed a commit
to processing/bevy
that referenced
this pull request
Apr 30, 2026
…#24018)" (bevyengine#24034) This reverts commit 98c6910. # Objective @cart's [objections](https://discord.com/channels/691052431525675048/749335865876021248/1499119335828881529): 1. I'm not sure top-level World methods for path-driven access is justifiable in its current form. For anything but the smallest application, looping over every Name in the app to find the one you're looking for is pretty much never what you want 2. Calling Name::to_string() and collecting the result in a Vec isn't going to cut it performance wise. Even within the scoped context of entity access we shouldn't be doing any allocations or "recomputations". Just the act of comparison across all entities is arguably too expensive ## Solution Revert it for now and go back to revising the work before landing it. ## Plan going forward [Core plan](https://discord.com/channels/691052431525675048/749335865876021248/1499120012034838692): 1. An EntityRef API that is always relative to the current entity 2. Grab the Children component. 3. Iterate over it, read the Name on each component, see if it matches the current piece of the path. 4. Add docs discouraging usage in most cases; users should prefer `EntityTemplate` and pre-resolved connections. As discussed [here](https://discord.com/channels/691052431525675048/749335865876021248/1499120218927271987), opt-in names indexing (both all names for inspector use cases and based on With filters for e.g. animation) should be considered too, but doesn't need to be in the MVP. @laundmo suggests the use of a trie, while Sander says that a hashmap is adequate in flecs.
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This reverts commit 98c6910.
Objective
@cart's objections:
Solution
Revert it for now and go back to revising the work before landing it.
Plan going forward
Core plan:
EntityTemplateand pre-resolved connections.As discussed here, opt-in names indexing (both all names for inspector use cases and based on With filters for e.g. animation) should be considered too, but doesn't need to be in the MVP. @laundmo suggests the use of a trie, while Sander says that a hashmap is adequate in flecs.