MixedRealityToolkit / MixedRealityToolkit-Unity

This repository holds the third generation of the Mixed Reality Toolkit for Unity. The latest version of the MRTK can be found here.
BSD 3-Clause "New" or "Revised" License
374 stars 96 forks source link

Investigate performance improvements to canvas UI #164

Closed IssueSyncBot closed 1 year ago

IssueSyncBot commented 1 year ago

Original issue opened by:

@AMollis AMollis


Describe the problem

MRTK3's canvas buttons and canvas dialogs are noticeably less performant than MRTK2/3's non-canvas versions. We need to understand why, and how to improve these elements.

Describe the solution you'd like

Come up with a plan for improving canvas buttons and canvas dialogs

Additional context

This issue seems related to https://github.com/microsoft/MixedRealityToolkit-Unity/issues/6180

Part of the issue might be because of the multiple z-layers on the MRTK3 buttons, which cause less of draw call batching within canvas UI (more batching occurs in non-Canvas UI)

Goals


ISSUE MIGRATION

Issue migrated from: https://github.com/microsoft/MixedRealityToolkit-Unity/issues/11471

IssueSyncBot commented 1 year ago

Original comment by:

@srinjoym srinjoym


Started this investigation. On first glance, it seems like we are creating more draw calls in canvas UI vs. comparable non canvas UI leading to the performance bottleneck. Will continue profiling this with more comparable scenes and then investigate areas to reduce draw calls.

The biggest source of draw calls so far is the button front plate as the individual icon and text takes two draw calls minimum. The default canvas UI tearsheet scene has 469 draw calls. With no front plate, we drop to 149 draw calls

IssueSyncBot commented 1 year ago

Original comment by:

@AMollis AMollis


Investigation was done, but no actionable items were found.