Repository navigation
Conversation
fderop
marked this pull request as ready for review
October 2, 2026 18:28
Contributor
|
I must misunderstand something. The very first thing that RunScriptedFunctionInAppropriateScripts() does is this block of code, which is effectively the exact same thing as the check added by the LLM here at each caller: How can doing this twice possibly improve performance? |
Contributor
|
Is it just that we're not constructing the temporary vectors passed into the function? |
Author
Yes, the vectors are built before the function gets a chance to return early. Checking at the caller avoids those allocations when there’s no callback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Collision notifications constructed Lua argument vectors before the dispatcher discovered that no callback existed.
Both collision paths now check the callback table first and reuse a static callback name. The terrain path uses:
Collision-state assignments remain unconditional. Objects with callbacks still use the original dispatcher for initialization, enabled-script filtering, locking, and invocation order.
The guard matches its existing early-return condition.
Across three process pairs, dense collision routines take 7.0–14.2% less time and terrain collisions take 32.0% less time.
Physics outputs and Lua callback checks match, including disabled and re-enabled scripts.
Gameplay mean simulation time improves from 2.610 to 2.565 ms, but p95 worsens from 8.746 to 9.078 ms.
This does not establish a general FPS or latency gain.
Only
MovableObject.cppchanges in production. Results and reproduction instructions.The included PMR pool experiment showed no reliable gain and remains test-only.