Hi, I am sending data to peers and those data need to be retreived from a scenegraph with a mutex to lock the data.
The process of gathering the data is taking a bit less than a ms. I'm starting the thread every time I want to gather the data. If I'm running at 60 fps, I'm starting the thread 60 times per second so is that a performance or design problem?
Would it be much better to have the thread always running and some kind of mechanism to ask him to perform the task whenever it's needed, so around 60 or 120fps?
Also, does starting a thread creates some memory alloc/dealloc and then produce on the long run some kind of fragmentation?
Thank you all.