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

Now that we have Changed<T>, optimize all the things #63

Closed
5 of 12 tasks
cart opened this issue Jul 20, 2020 · 12 comments
Closed
5 of 12 tasks

Now that we have Changed<T>, optimize all the things #63

cart opened this issue Jul 20, 2020 · 12 comments
Labels
C-Performance A change motivated by improving speed, memory usage or compile times D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@cart
Copy link
Member

cart commented Jul 20, 2020

We should be using Changed<T> everywhere we can to avoid doing redundant work:

  • Transforms
  • Parents/Children
  • Labels
  • Render Nodes
    • lights
    • camera
    • render_resources (potentially a huge win here)
  • Cameras
  • ShaderDefs
  • Sprites
  • UI update system (only update "dirty" parts of the tree)
  • Pipeline Compiler (only run when RenderPipelines component has changed)
@karroffel karroffel added C-Performance A change motivated by improving speed, memory usage or compile times D-Trivial Nice and easy! A great choice to get started with Bevy labels Aug 12, 2020
@tristanpemble
Copy link
Contributor

I was looking into doing this for the transforms systems. For transform_translation_rotation_scale_system, the current query is:

Query<Without<LocalTransform, Without<NonUniformScale, (&mut Transform, &Translation, &Rotation, &Scale)>>>

ideally we could do something like

Query<Without<LocalTransform, Without<NonUniformScale, (&mut Transform, &Translation, &Rotation, &Scale, Any<Changed<Translation>, Changed<Rotation>, Changed<Scale>>)>>>

the idea being we want to run this system on anything that has Transform, Rotation and Scale, and at least one of those was changed.

I asked in Discord and it seems like this is not currently possible (tldr queries are and only, no or right now)

@tristanpemble
Copy link
Contributor

@cart it may be worth changing your list into checkboxes so we can track status

@Axighi
Copy link

Axighi commented Nov 14, 2020

What's left for this task?

@chrisburnor
Copy link

What's left for this task?

Camera seems undone (from my cursory grepping through the codebase) but it's honestly kind of hard to figure out what has been done.

@cart
Copy link
Member Author

cart commented Dec 30, 2020

Just updated the description with checkboxes indicating whats been done.

@cart
Copy link
Member Author

cart commented Dec 30, 2020

I'm currently working on a rework of parenting/children. And #1046 is covering the ShaderDefs case.

@alice-i-cecile
Copy link
Member

This should be looked at again once #68 is solved and we add explicit dependencies to our default systems for 0.5.

@thechubbypanda
Copy link

thechubbypanda commented Aug 26, 2021

Bump, #68 has been cleared and I wanna help 😝

What's left to do?

@alice-i-cecile
Copy link
Member

I would start by tackling the parent-child section of the code in your first PR.

RenderNodes, Sprites, and ShaderDefs are all being reworked; you'll have to work off of the pipelined-rendering branch for those.

UI update system has... larger issues, so it probably isn't worth the time right now.

@thechubbypanda
Copy link

Please see https://discord.com/channels/691052431525675048/692572690833473578/880354698647986197

I could be wrong but it looks like it's already done in #417. I may also not be looking at the right code.

@alice-i-cecile
Copy link
Member

Yep, looks correct; seems like the list was just out-dated.

@cart
Copy link
Member Author

cart commented Aug 26, 2021

Yeah I think we should probably close this issue out. Its from The Old Days™ and I don't think anything in the list is particularly relevant anymore.

@cart cart closed this as completed Aug 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Performance A change motivated by improving speed, memory usage or compile times D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

No branches or pull requests

7 participants