Dijkgraaf - 11:29 pm on Feb 6, 2012 (gmt 0)
Tec4, you look to be doing some GIS type calculations on the fly. This will cause a lot of processing and may be the cause of your spiking CPU.
Is it possible to pre-calculate this distance rather than doing it on the fly?
Also do a search on GIS donut, as that is a concept to reduce the load of looking for results in a GIS situation.