Skip to content

Extract sprites into a Vec #17619

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

Merged
merged 10 commits into from
Mar 18, 2025

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Jan 30, 2025

Objective

Extract sprites into a Vec instead of a HashMap.

Solution

Extract UI nodes into a Vec instead of an EntityHashMap.
Add an index into the Vec to Transparent2d.
Compare both the index and render entity in prepare so there aren't any collisions.

Showcase

yellow this PR, red main

cargo run --example many_sprites --release --features "trace_tracy"

extract_sprites
extract_sprites

queue_sprites
queue_sprites

@ickshonpe ickshonpe changed the title Extract sprites to a vec Extract sprites to a Vec Jan 30, 2025
@ickshonpe ickshonpe changed the title Extract sprites to a Vec Extract sprites into a Vec Jan 30, 2025
@alice-i-cecile alice-i-cecile added A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples labels Jan 30, 2025
@alice-i-cecile alice-i-cecile added the S-Needs-Review Needs reviewer attention (from anyone!) to move forward label Jan 30, 2025
@alice-i-cecile alice-i-cecile added this to the 0.16 milestone Jan 30, 2025
@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it and removed S-Needs-Review Needs reviewer attention (from anyone!) to move forward labels Feb 25, 2025
@alice-i-cecile
Copy link
Member

@ickshonpe if you can get CI passing I'll merge this in for you :)

@alice-i-cecile alice-i-cecile added S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged and removed S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it labels Mar 2, 2025
@JMS55
Copy link
Contributor

JMS55 commented Mar 18, 2025

@alice-i-cecile CI is passing now.

@alice-i-cecile alice-i-cecile removed the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Mar 18, 2025
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 18, 2025
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 18, 2025
Merged via the queue into bevyengine:main with commit 4d8bc61 Mar 18, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Rendering Drawing game state to the screen C-Performance A change motivated by improving speed, memory usage or compile times D-Straightforward Simple bug fixes and API improvements, docs, test and examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants