I’ve had a few random questions about the codebase that have been piling up, and I haven’t had a good chance to ask them so… I’m going to dump them all here and hopefully get at least some of them answered.
- What do cached entity queries cache? Is it just the index of the component given its type?
- When should they not be used?
- Does it matter if they’re stored as a field on a system, or just as a local variable? Presumably the former is better, but I see a lot of cases where it’s just grabbed every single update loop and many others where it’s a field.
- Why don’t cached entity queries have stuff like EnsureComp or RemComp?
- Is there a difference between a query on
XComp, Transform
versus just querying forXComp
and getting the transform viaTransform(uid)
inside the loop? - When should you use MapInit versus ComponentInit versus ComponentStartup? (I’m especially curious about MapInit versus ComponentInit; I know ComponentStartup is where an entity’s other component’s have been been initialized. See also next question, though.)
- Why can component startup be called “multiple times during its life, and at any time”? Ditto for ComponentShutdown.
- Wawa?
- Is it possible to take and view serverside ProfManager snapshots?
- Why is this a sandbox violation?
- What does EUI stand for I’m begging you I cannot figure this out
- How deep should UI abstraction go? Concrete example: consider disposal tagged versus disposal router. Should these ultimately be the same xaml file, with a bit of logic on their shared xaml.cs state to change their behavior? Or should it be different xamls but the same BUI, which handles differentiating the behavior? Or should it be different BUIs, but well abstracted BUI message types that both BUIs use, with the differing logic handled by the BUI event listener?
- For integration tests, when should logic and assertions be versus not be inside your WaitAssert blocks? Why is it dangerous (in some/all cases?) to heavily mix threads if everything is awaited? (Specifically looking at this PR.)
- Not a question but I found Significant lock contention with parallel JIT compilation via expression trees · Issue #107197 · dotnet/runtime · GitHub and now I’m sad…