Page 1 of 1

llCastRay is a CPU hog!

Posted: Fri Oct 30, 2015 8:41 am
by Kayaker Magic
I have done some timing tests with llCastRay before and found it to be terrible on OpenSim. On InWorldz using the PhysX engine, it is much more reasonable. Tonight I tried bringing a zombie application over from InWorldz that uses llCastRay to walk a non-physical zombie around on terrain or prims. This time I watched the CPU statistics and was horrified to see that one zombie used up around 30% of a CPU. 6 zombies and the chart tells me I was using up the horsepower of two CPU cores. This was a script that calls llCastRay 4 times a second, so 12 calls per second to llCastray pegs your CPU usage at 100%.

I can't bring some projects to OpenSim until llCastRay has been made more efficient.