The problem seems to be because of DynamicGeometryManager :: transcodeVerticesAndCalculateBounds. In my case, it took 135ms to process when :SetNormal() was called on a normal id, where 1000 vertices are sharing the same normalId.
The problem is made even worse since the time complexity is O(n^2)
where the x-axis is time (seconds) and the y-axis is number of vertices sharing the same normal id that is being set.
This means that if you have 20,000 vertices sharing a normal id, it’ll crash the game since it takes too long to compute.
System Information:
Windows 10
Intel i5-9400F
NVidea GeForce GTX 1650
16GB RAM