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

feat: implement deeper throttling for Transform, MeshRenderer and GltfContainer #177

Merged
merged 4 commits into from
Jan 24, 2024

Conversation

leanmendoza
Copy link
Collaborator

@leanmendoza leanmendoza commented Jan 23, 2024

What?

  • take a deep throttling measuring the end_time_us each 10 transform update and each 1 mesh_rendere/gltf_container update
  • move add_child from main_tree queue (gltf_container.gd) to scene processing stage

Why?

Avoid processing time that is longer than the stipulated

@codecov-commenter
Copy link

codecov-commenter commented Jan 23, 2024

Codecov Report

Attention: 67 lines in your changes are missing coverage. Please review.

Comparison is base (03bf605) 51.22% compared to head (4f23a77) 48.63%.
Report is 3 commits behind head on main.

Files Patch % Lines
...-lib/src/scene_runner/components/gltf_container.rs 70.96% 18 Missing ⚠️
rust/decentraland-godot-lib/src/dcl/crdt/mod.rs 7.14% 13 Missing ⚠️
...rc/scene_runner/components/transform_and_parent.rs 62.85% 13 Missing ⚠️
...t-lib/src/scene_runner/components/mesh_renderer.rs 71.42% 8 Missing ⚠️
...t/decentraland-godot-lib/src/scene_runner/scene.rs 88.23% 4 Missing ⚠️
...raland-godot-lib/src/scene_runner/scene_manager.rs 66.66% 4 Missing ⚠️
...and-godot-lib/src/scene_runner/components/tween.rs 0.00% 2 Missing ⚠️
...dot-lib/src/scene_runner/components/ui/scene_ui.rs 0.00% 2 Missing ⚠️
...traland-godot-lib/src/scene_runner/update_scene.rs 88.23% 2 Missing ⚠️
...st/decentraland-godot-lib/src/dcl/common/string.rs 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #177      +/-   ##
==========================================
- Coverage   51.22%   48.63%   -2.59%     
==========================================
  Files         140      141       +1     
  Lines       17047    17161     +114     
==========================================
- Hits         8732     8346     -386     
- Misses       8315     8815     +500     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@kuruk-mm kuruk-mm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks great! Tested and it's working.

Maybe, and just maybe, and if you want, we can separate in another PR the Transform, and iterate a bit over it to make look better. Right now the scene transform updates for neighborhood scenes are laggy.

Video references:

Before:
https://github.com/decentraland/godot-explorer/assets/12563266/9863cfc3-5a64-4f4a-b178-8d3c93c350d5

With this PR:
https://github.com/decentraland/godot-explorer/assets/12563266/f9c16f50-aef3-46b1-8991-cc29da9d7fff

Comment on lines 243 to 246
// NOTE: this is commented out because the put already sets the component as dirty
// the current dirty is used to update the scene, and the put is used to update the crdt state
// the current_dirty for Transform was used before and is going to be discarded soon

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But are we going to use this code? Can we change to a TODO: discard current_dirty for Transform that is no longer used

@leanmendoza leanmendoza merged commit c249172 into main Jan 24, 2024
3 checks passed
@leanmendoza leanmendoza deleted the feat/deeper-scene-throttling branch January 24, 2024 18:06
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.

3 participants