I already made a post about this in the runtime section, but now I realized that this happens even if you take the current branch example UE4 project, copy the spine-c folder where it goes, generate visual studio files and then rebuild from visual studio. You get this kind of performance: (both tests in the same machine. I only have one though so I havent been able to check in other hardware):
https://imgur.com/6ikDMw7
Now if you delete the "true" part in the file spine-runtimes-3.6\spine-runtimes-3.6\spine-ue4\Plugins\SpinePlugin\Source\SpinePlugin\PrivateSpineSkeletonRendererComponent.cpp
void USpineSkeletonRendererComponent::Flush (int &Idx, TArray<FVector> &Vertices, TArray<int32> &Indices, TArray<FVector2D> &Uvs, TArray<FColor> &Colors, TArray<FVector>& Colors2, UMaterialInstanceDynamic* Material) {
if (Vertices.Num() == 0) return;
SetMaterial(Idx, Material);
TArray<FRuntimeMeshVertexTripleUV> verts;
for (int32 i = 0; i < Vertices.Num(); i++) {
verts.Add(FRuntimeMeshVertexTripleUV(Vertices[i], FVector(), FVector(), Colors[i], Uvs[i], FVector2D(Colors2[i].X, Colors2[i].Y), FVector2D(Colors2[i].Z, 0)));
}
CreateMeshSection(Idx, verts, Indices, true);
// CreateMeshSection(Idx, Vertices, Indices, TArray<FVector>(), Uvs, darkRG, Colors, TArray<FRuntimeMeshTangent>(), false);
Vertices.SetNum(0);
Indices.SetNum(0);
Uvs.SetNum(0);
Colors.SetNum(0);
Colors2.SetNum(0);
Idx++;
}
You get, this kind of performance:
https://imgur.com/a/qatsn
I realize this probably has more to do with the CreateMeshSection() function (which I think is an UnrealEngine defined function), but as a default setting for the plugin it doesn't feel right that the tick function takes like 10 times more time and has a lot of spikes (which is the same thing that happened to my project after updating before reverting the "true" part). Of course it might be that it can't be replicated on other hardware or it's something specific to my machine but still think is worth pointing out.
Thanks for reading and for any replies I might get.