deepClone slower since recent updates?


I’ve just updated the to the latest build and noticed a lag in my game - it occurs when the user is manipulating geometry - if they stretch or pull something, I need to rebuild the affected meshes - which involves deepCloning all the necessary objects - I need deepClone to maintain the tex coords of the individual objects. Before the update, I didn’t noticed any lag, but now there is during deep cloning - I’m just wondering is there an alternative to getting a deep clone of an object quickly - or at least transferring tex coords to another mesh quickly.

Don’t know about the other… but transferring texture coordinates should be easy, I think. Or is there some peculiarity that makes it hard to pull the tex coord VertexBuffer from one and shove it into another?

yeah i’ll try that,

but the problem if i’m honest is my code needs better thought out :wink: could be a lot better, but just wondering why deep clone is taking about twice as long.

How far back was your last version? Maybe you can go through the commits and see if something jumps out at you as causing the slow-down.

oh was a month or so ago - i have a bad habit of not updating enough…

deepClone() is generally a very evil call … It clones all the buffer data for everything so its definitely not something you want to call in real time

yeah i’m just gonna rewrite more efficient code anyway, cheers.