Skip to content

[2.8.1] perf pass#10643

Merged
keveleigh merged 25 commits into
microsoft:releases/2.8.1from
keveleigh:2.8.1-perf
Jun 16, 2022
Merged

[2.8.1] perf pass#10643
keveleigh merged 25 commits into
microsoft:releases/2.8.1from
keveleigh:2.8.1-perf

Conversation

@keveleigh

@keveleigh keveleigh commented Jun 14, 2022

Copy link
Copy Markdown
Contributor

Overview

  • Removes some allocations in CameraFOVChecker, ObjectManipulator, ObjectManipulator, and LRUCache
  • Returns early in MicrosoftArticulatedHand, GenericXRSDKController, and FocusProvider at an earlier point where we know there's no work to be done
  • Cache the result of some expensive (at least, when you call them as much as we do) calls in OpenXRDeviceManager, XRSDKDeviceManager, BaseCursor, and FocusProvider
  • Migrate XRSDKDeviceManager to use the InputDevices events instead of polling every frame (which can be expensive for this method)
  • Update ControllerPoseSynchronizer and FocusProvider to use SetPositionAndRotation in hot loops
  • Update ObjectManipulator to not update twice per frame when doing two handed manipulation...
  • Disable the LinePointer's line data provider when the pointer isn't active, since there's no need to update a line for an inactive pointer
  • Rewrite ObjectManipulator to no longer use a dictionary

@keveleigh

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@keveleigh keveleigh self-assigned this Jun 14, 2022
@keveleigh keveleigh requested a review from RogPodge June 14, 2022 23:22
Comment thread Assets/MRTK/SDK/Features/UX/Scripts/Pointers/LinePointer.cs Outdated
Comment thread Assets/MRTK/SDK/Features/UX/Scripts/Pointers/SpherePointer.cs
Comment thread Assets/MRTK/SDK/Features/UX/Scripts/Pointers/SpherePointer.cs
Comment thread Assets/MRTK/Providers/OpenXR/Scripts/MicrosoftArticulatedHand.cs
Comment thread Assets/MRTK/SDK/Features/Input/Handlers/ObjectManipulator.cs Outdated
Comment thread Assets/MRTK/SDK/Features/Input/Handlers/ObjectManipulator.cs Outdated
Comment thread Assets/MRTK/SDK/Features/Input/Handlers/ObjectManipulator.cs Outdated
@keveleigh

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@david-c-kline david-c-kline left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

question about ValueTuple, otherwise looks good!

}

Tuple<Collider, Camera> cameraColliderPair = new Tuple<Collider, Camera>(myCollider, cam);
ValueTuple<Collider, Camera> cameraColliderPair = ValueTuple.Create(myCollider, cam);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

ValueTuple is a .net framework 4.7 feature. any thoughts as to whether or not this will break on older unity versions?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Validated a successful UWP IL2CPP build in Unity 2018 locally!
image

@keveleigh

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@keveleigh keveleigh merged commit 6884b43 into microsoft:releases/2.8.1 Jun 16, 2022
@keveleigh keveleigh deleted the 2.8.1-perf branch June 16, 2022 01:09
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