Commit 0a056c7
authored
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.
1 parent 98c6910 commit 0a056c7
5 files changed
Lines changed: 7 additions & 533 deletions
File tree
- _release-content/release-notes
- crates
- bevy_ecs/src
- world
- bevy_scene/src
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | 408 | | |
411 | 409 | | |
412 | 410 | | |
| |||
437 | 435 | | |
438 | 436 | | |
439 | 437 | | |
440 | | - | |
441 | | - | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
446 | | - | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | 438 | | |
453 | 439 | | |
454 | 440 | | |
455 | 441 | | |
456 | 442 | | |
457 | 443 | | |
458 | | - | |
459 | 444 | | |
460 | 445 | | |
461 | 446 | | |
| |||
465 | 450 | | |
466 | 451 | | |
467 | 452 | | |
468 | | - | |
469 | 453 | | |
470 | 454 | | |
471 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | 78 | | |
99 | 79 | | |
100 | 80 | | |
| |||
0 commit comments