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

Simplify Transform Implementation Where Possible #576

Closed
ilexp opened this issue Oct 11, 2017 · 1 comment
Closed

Simplify Transform Implementation Where Possible #576

ilexp opened this issue Oct 11, 2017 · 1 comment
Labels
Cleanup Improving form, keeping function Core Area: Duality runtime or launcher Performance Related to runtime or editor performance Task ToDo that's neither a Bug, nor a Feature
Milestone

Comments

@ilexp
Copy link
Member

ilexp commented Oct 11, 2017

Summary

The Transform component is by far the most used component in Duality. Handling as many of them as possible while keeping performance impacts low is a priority. However, Transform currently carries some potentially costly logic that is rarely used, like calculating and updating velocity values. Investigate whether they can be removed, benchmark the results and compare them to previous benchmarks.

Analysis

  • Check if velocity calculations can be removed. Might actually work without too many drawbacks.
  • Check if change event delivery can be removed. Maybe not though - this could actually be quite useful, and RigidBody relies on this.
  • Investigate potential optimizations for non-moving Transform components, which are probably 90% of them.
@ilexp ilexp added Cleanup Improving form, keeping function Core Area: Duality runtime or launcher Performance Related to runtime or editor performance Task ToDo that's neither a Bug, nor a Feature labels Oct 11, 2017
@ilexp ilexp added this to the v3.0 milestone Oct 11, 2017
@ilexp
Copy link
Member Author

ilexp commented Oct 13, 2017

Progress

  • Investigated velocity calculation removal and found that this isn't possible without drawbacks.
    • A very important distinction in transform changes is whether an object was moved or teleported there. This makes a difference for attached sounds and sound listeners, but there are probably other cases as well.
    • This distinction is completely lost when taking away velocity from Transform. So for now, it will need to stay.
  • Found no optimizations for non-moving transforms so far, except introducing an explicit IsStatic flag / property, which requires and extended design and is sort of a different issue.

Closing this issue for now as there's nothing much left to do within its scope. Open a new one when there's a more concrete design on static transforms, or other transform optimizations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Improving form, keeping function Core Area: Duality runtime or launcher Performance Related to runtime or editor performance Task ToDo that's neither a Bug, nor a Feature
Development

No branches or pull requests

1 participant