Repository navigation
VoiceTypeAssetLookup Optimisations - #707
Draft
kieranknowles1 wants to merge 19 commits into
Draft
kieranknowles1 wants to merge 19 commits into
kieranknowles1 wants to merge 19 commits into
Conversation
Original was incorrect, second case did not include the dummy speaker. Tighten to enforce behaviour around inverting (see PR Mutagen-Modding#697 comment)
Split sets of faction NPCs into statically defined members and potential members.
Costs a few ms on prep, but greatly accelerates GetIsVoiceType searches.
Replace unscoped resolve in `GetIsVoiceType` form list check with hashset. Probably intended to check the entry was a voice type but never enforced this.
Slight reduction in allocations across the board.
Reduce usage of `ToDictionary` in condition handling. Slight speedup to these conditions.
Significantly improves invert performance, 2x whole load order speed from this alone.
The voiceContainers.Any() check meant evaluating the container creation twice for each OR block Significant improvements across the board from this.
Marginal speedup
Use usage cache for scene responses. Saves memory at the cost of minimal performance loss in scenes.
Represent universal set as null instead. Getting into micro optimisations here, but still gives a small speedup and decent reduction in allocations.
This branch has not been deployed
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.
Significant optimizations to VoiceTypeAssetLookup, resulting in a nearly 10x speedup when running against Skyrim.esm
Notable changes:
GetIsVoiceTypeconditions.GetIsVoiceTypeagainst a form list.VoiceContainer.Invertfunction.VoiceContainerExtensions.MergeInserton an or block.Includes fixes for voice container intersections that lose all speakers and aliases having conditions plus the unique actor fill type which both caused false positives, which will be extracted into their own PR.
Built on top of #697
Benchmarks, run with
Skyrim.esmactive and no other plugins.Baseline
Final