isBlobInRadius involves getBlobsInRadius, but really, it could early exit just fine if it was rewritten to use a custom query callback. Very little of use of that function in vanilla
getBlobsInRadius involves appending from a list generated by getBlobsInBox, thus involving unnecessary overhead. Interestingly, though, said overhead seems to be very low compared to getBlobsInBox execution time.
Hence, getBlobsInBox may benefit from some more aggressive optimizations. How, though? Somehow, a good chunk of the time is spent into filtering out the blobs.
getBlobsInRadius could perform the distance check inside of a custom query callback instead of filtering the output of getBlobsInBox a posteriori.
getBlobsInBox and getBlobsInRadius appear somewhat high in the profile in some situations because of the Script::tick_blob_in_proximity flag. Because in this case the case is not really one-shot, we could set up a sensor shape that triggers the blob tick instead of having to go through the entire process, making it essentially free.
Very little of use of that function in vanillaisBlobInRadius
involvesgetBlobsInRadius
, but really, it could early exit just fine if it was rewritten to use a custom query callback.getBlobsInRadius
involves appending from a list generated bygetBlobsInBox
, thus involving unnecessary overhead. Interestingly, though, said overhead seems to be very low compared togetBlobsInBox
execution time.getBlobsInBox
may benefit from some more aggressive optimizations. How, though? Somehow, a good chunk of the time is spent into filtering out the blobs.getBlobsInRadius
could perform the distance check inside of a custom query callback instead of filtering the output ofgetBlobsInBox
a posteriori.getBlobsInBox
andgetBlobsInRadius
appear somewhat high in the profile in some situations because of theScript::tick_blob_in_proximity
flag. Because in this case the case is not really one-shot, we could set up a sensor shape that triggers the blob tick instead of having to go through the entire process, making it essentially free.