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

WIP: Add Ignore Depsgraph option #1794

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

IzaZed
Copy link
Collaborator

@IzaZed IzaZed commented Feb 15, 2023

This is an attempt at reducing the Depsgraph workload on static, idle objects that don't need to be updated.
It works best if there are only static/no collision objects in the scene, otherwise the depsgraph load is half of what we have now.
I still want to investigate if I can find a way to improve performance when having a physicsobject in the scene, so please don't merge yet!

image

It adds a new option to override the depsgraph entirely, tested with 1000 cubes:

image

@BluePrintRandom
Copy link
Member

can this be brought up to current and merged into master @youle31 ?

@youle31
Copy link
Collaborator

youle31 commented Sep 29, 2023

can this be brought up to current and merged into master @youle31 ?

On my side, as explained on discord, i don't think this patch will bring major benefits. This is tested with not moving object but scene has many objects and of if only one object is moving, the depsgraph cost will remain high.

@IzaZed
Copy link
Collaborator Author

IzaZed commented Sep 30, 2023

I haven't had a look at this for quite a while as other things are more pressing right now
But I fear that youle's right, at least the current status of the branch is only useful when everything is static

What we'd need would be to ignore an object regardless of other updates in the scene, as currently the depsgraph is completely re-validated whenever something changes - Then an option like this would really make sense

I'd like to investigate this further when I have the time and it's still an issue then, though, after 4.0 is out

@JYamihud
Copy link

Something like this could be very cool to be dynamic. Basically objects that are static at the moment could be excluded from Depsgraph. If there is a bge call for to change during gameplay in python this could be cool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants