Repository navigation
Conversation
… reading the player
Owner
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.
What changes
LiveReads::answerhands each live question to the families in order until one takes it. The bags family (BagLive) comes fourth. For every question, before it checked the question's type, it read:Query::single),ViewStores::item_objects).SelectionQueryandGroupRowsQueryare answered further down the list, byselectionandroster. They pass through the bags family on every unit-token walk.Bags::answernow returnsfalseunless the question is one of the eight it answers. The check uses a newLiveAsk::is::<Q>(), which tests the question's type without answering it.What stays the same
No 1.12 behaviour changes: the getters read what they read before.
How to see it, before and after
Setup: a
bags_cooldown_tests-style world with aSelfPlayerholding 16 backpack items, andeval_with_bagsrunningUnitExists('target')200,000 times. That asksSelectionQuerythrough the bags' reads. Dev profile, same machine:In the same world,
GetContainerItemInfo(0, 1..16)still finds all 16 items.Where it shows in play
The evidence is a Very Sleepy capture of a client built on benilla, 83 s late in a busy run, with names from a PDB of a nearby build:
ui_unit::field_events::fire→UiScript::unit_has_field_watchers/unit_tokens_of→live::ask→LiveReads::answertakes 9% of the main thread.Bags::answeralone is 2.1% of the main thread:Query::single_inner,item_objectsand their allocations.Checks (Windows, without the client data)
rustfmt --checkon both changed files: clean.cargo fmt --all --checkcan't start on this machine because the workspace's command line exceeds Windows' length limit (os error 206).cargo clippy -p benilla-ui -p benilla-app --all-targets -- -D warnings: clean.wgpu-haldependency (bind_cbv), not from benilla.cargo test -p benilla-ui --lib: 3576 passed, 0 failed.cargo test -p benilla-app --lib: 7764 passed, 0 failed.