Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
Superseded by the PR from the renamed branch perf-unit-listeners-per-event (Grill cannot read branch names with a slash). |
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.
Change
EventListener.hasUnitListenersis now one flag per event id instead of one global flag.Before, the first unit listener of any event switched on the unit lookup for every delivery of every event:
GetTriggerUnit(),peekIndex(),getIndex()and an array read before the global listeners. That applies even for events that have no unit listener at all. Now only deliveries of an event that has unit listeners do the lookup. The flag still never resets, so it cannot fall out of step with the chains. Delivery order and which listeners run are unchanged.Castle Fight has a single production unit listener, a structure
ISSUED_ORDERlistener that tracks the Parasite autocast toggle. Today that one listener makes every damage delivery pay the lookup, about 1.2 us per hit by the earlier measurement of this skip. With this change only order deliveries pay it.Tests
ClosureEventsTests.aUnitListenerOfOneEventLeavesTheOtherEventsUnflagged: a unit listener ofEVENT_PLAYER_LEAVEflags that event only. A dispatch of the chat-filter event to the same unit runs no unit listener.StdlibIngameDamageTests(in-game 24): a unit listener onISSUED_ORDERhears a realstoporder on its unit and not on another unit, and the damage listeners still hear their hits.grill typecheck --quietpassed.grill test --quietpassed 772/772.Not yet verified in game
The in-game test 24 and the Castle Fight e2e have not run yet: Warcraft is in use on this machine. Map integration is tracked in Castle Fight PR 502, which points its stdlib dependency at this branch. That PR still owes
building-catalog,spell-capability,spell-effect-diag,train-queueandsync-system.