Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ThinColumn in ComponentSparseSet #18245

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

ecoskey
Copy link
Contributor

@ecoskey ecoskey commented Mar 10, 2025

Objective

The Column/ThinColumn split is a significant amount of code duplication and makes optimizations to either harder to maintain.

Solution

  • Migrate ComponentSparseSet to use ThinColumn rather than Column. This requires some extra bookkeeping but it's overall not too bad.

  • Only downside: ComponentSparseSet is no longer Debug.

  • Should we rename ThinColumn to Column now that there's no overlap?

Testing

  • bevy_ecs tests pass
  • miri passes
  • profile to check perf (necessary?)

still some issues currently, figured I'd at least make sure it's something we want before continuing :)

@ecoskey ecoskey changed the title migrate ComponentSparseSet to ThinColumn Use ThinColumn in ComponentSparseSet Mar 10, 2025
@ecoskey ecoskey added A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use S-Needs-Benchmarking This set of changes needs performance benchmarking to double-check that they help D-Unsafe Touches with unsafe code in some way S-Needs-Review Needs reviewer attention (from anyone!) to move forward S-Needs-Testing Testing must be done before this is safe to merge and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Mar 10, 2025
@ecoskey
Copy link
Contributor Author

ecoskey commented Mar 10, 2025

tests pass!

lastly: Seems like there's some dead code left behind from removing Column, but it seems like the kind of thing we should keep. What's preferred here?

@ecoskey ecoskey marked this pull request as ready for review March 10, 2025 23:55
@ecoskey ecoskey added S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Needs-Benchmarking This set of changes needs performance benchmarking to double-check that they help S-Needs-Testing Testing must be done before this is safe to merge labels Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Unsafe Touches with unsafe code in some way S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant