Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blob in radius (etc.) optimization #138

Open
asumagic opened this issue Nov 11, 2021 · 0 comments
Open

Blob in radius (etc.) optimization #138

asumagic opened this issue Nov 11, 2021 · 0 comments
Labels
enhancement New feature or request performance Performance bugs and optimization opportunities

Comments

@asumagic
Copy link
Owner

asumagic commented Nov 11, 2021

  • 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.
@asumagic asumagic added performance Performance bugs and optimization opportunities enhancement New feature or request labels Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Performance bugs and optimization opportunities
Projects
None yet
Development

No branches or pull requests

1 participant