Good afternoon,
In order to delve into performance-related issues, I have recently been carefully examining the code of the Spine-Unity runtime.
The Spine-Unity runtime has many performance optimization techniques, such as double buffering and single submesh optimization.
I found one of the optimizations involves avoiding repeated calls to mesh.SetTriangles by comparing render instructions between frames. But The comment for #define SPINE_TRIANGLECHECK says: "Not for optimization. Do not disable."
I would like to ask if this switch is used for performance optimization. If not, why is it advised not to disable it? When the switch is enabled, although it avoids the call to SetTriangles, it adds overhead due to mesh comparisons. Which of these two performance costs is greater? And Why don't I see similar operations in other spine runtimes (ue, threejs,etc)?
If you could provide some insights or clarify this, I would greatly appreciate it. Thank you very much for your assistance.