llCastRay is a CPU hog!

Tips and discussions about using OpenSim
Post Reply
User avatar
Kayaker Magic
Posts: 354
Joined: Sun Dec 01, 2013 8:40 am
Has thanked: 52 times
Been thanked: 393 times

llCastRay is a CPU hog!

Post 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.
These users thanked the author Kayaker Magic for the post (total 2):
Keith SelmesSelby Evans
Post Reply