ultimatexr-unity icon indicating copy to clipboard operation
ultimatexr-unity copied to clipboard

Improved CPU performance

Open smitdylan2001 opened this issue 1 year ago • 2 comments

Improved CPU performance with different fixes. Some more important than others (SetPositionAndRotation should ALWAYS be used for example)

  • Use SetPositionAndRotation instead of double transform call
  • Re ordering vector calculations
  • Merged if/else return into return
  • Merged if/else bool into direct bool set
  • Use TryGetComponent to avoid garbage allocation
  • Use native .Count/.Length instead of LINQ alternative
  • Improve string comparison
  • Use AddRange
  • Use Color32 when setting pixels

smitdylan2001 avatar Sep 20 '22 14:09 smitdylan2001

Hey Dylan. Hoping that gets merged! Thanks again for posting those Unity project templates for accelerated Quest performance.

01GOD avatar Sep 26 '22 07:09 01GOD

Thanks a lot @smitdylan2001! Will be reviewed and merged in the next update.

entromp avatar Oct 10 '22 11:10 entromp