llCastRay is a CPU hog!

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

llCastRay is a CPU hog!

Post by Kayaker Magic » Fri Oct 30, 2015 8:41 am

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