Skip to content

Rendering performance has degraded in v5 #12

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

Closed
NicEastvillage opened this issue Jan 11, 2025 · 4 comments
Closed

Rendering performance has degraded in v5 #12

NicEastvillage opened this issue Jan 11, 2025 · 4 comments

Comments

@NicEastvillage
Copy link
Contributor

NicEastvillage commented Jan 11, 2025

Noticed by both me and Scumclass (Discord help thread).

In v4, Beast and Noob Block were performing fine with rendering enabled (100% of packets answered). In v5, Beast is at 3% of packets answered with rendering enabled even though it is the same number of rendering calls (Note: It is also slow then rendering is disabled for the match). Since it worked in v4, the issue is not simply "Python slow".

We have not converted any medium+ sized bots in other languages to v5, so we cannot exclude that the problem may be in core.

Beast in v4: https://github.com/NicEastvillage/RLBot-Beast/tree/RLBotV4
Beast in v5: https://github.com/NicEastvillage/RLBot-Beast/tree/RLBotV5Convert

@VirxEC
Copy link
Collaborator

VirxEC commented Jan 12, 2025

I'm unable to replicate this issue. I think it's been solved in recent patches, after the help thread was made.
image

@VirxEC VirxEC moved this from Todo to In Progress in RLBot v5.0 Jan 12, 2025
@VirxEC
Copy link
Collaborator

VirxEC commented Jan 12, 2025

Hopefully this issue has been at least slightly improved on low-performance systems by 0f282de

@VirxEC
Copy link
Collaborator

VirxEC commented Jan 27, 2025

I have a feeling that this issue was related to the ball path problem a while ago. Since beast renders the ball path, this might explain it. This would also mean that the issue has been solved. Results from cProfile show draw_ball_path still taking up some time, but optimizing around items like vec.py would be better as it takes up significantly more time. draw_ball_path is also quite inefficiently written, something like this is more efficient to generate the list locations:

max_slice = int(math.ceil(duration * 120))
locations = [s.physics.location for s in pred.slices[0:max_slice:step_size]]

@NicEastvillage
Copy link
Contributor Author

Can confirm that 0f282de fixed the issue. My Vec3 is inheriting the Vector3 from https://github.com/VirxEC/rlbot_flatbuffers_py. Maybe we can investigate optimization for Vector3 such that they benefit everyone.

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

No branches or pull requests

2 participants