Repository navigation
perf: retrieve the VB data context cache once per dispatch - #411
Open
marius-bughiu wants to merge 1 commit into
Open
marius-bughiu wants to merge 1 commit into
marius-bughiu wants to merge 1 commit into
Conversation
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.
Standalone Visual Basic source repeats the cache-array lookup in every expression-ID branch. Retrieve the array once before dispatch when IDs are dense, then keep each expression's existing cache slot and lazy data-context construction. Guard invalid IDs before touching the activity context. Empty/sparse IDs, C#, partial classes and the location-list overload retain their previous paths. This cohort shows lower allocations but no whole-process elapsed-time improvement; the measured time increases are shown below.
Stack 4/4; base branch
codex/corewf-03-share-vb-cache-helpers. Cumulative results start at public CoreWF commit65caba7c7fc7d141e847775b00f2c9558e8daa59. None of these optimizations relies on duplicate expression text.Measured on six synthetic authored cases with scenario-local variables and mostly unique expressions, with execution templates assigned versus removed. All validation and analyzer rules are enabled. Each of the five source-built CoreWF states ran twice per variant in forward/reverse order, serially on the same machine and compiler host. Every run deleted the isolated project
.localfirst. The actual loaded CoreWF image hashes, input inventories, diagnostics and output coverage were verified.Adjacent change (preceding stack state → this state; medians of two runs):
Whole-process observations behind the adjacent medians: With templates: before [23 s, 26 s], after [26 s, 24 s]. Without templates: before [23 s, 22 s], after [23 s, 25 s].
Cumulative change (original CoreWF state → this state; same cohort):
Validation: The exact publication commit passed 38 cumulative focused cases and 57 existing cases. This evolves the preceding source-generation test class, preserves its execution checks and root-only helper assertion, and adds invalid-ID/empty-input coverage. Sixteen behavior cases passed on the preceding implementation. The statement test preserves an existing generator rejection; it does not claim statement execution support. Release owner builds used SDK 8.0.426 and net6.0-windows; the compiler host used .NET 10.0.11. The complete CoreWF test suite was not run. Build copies disabled the repository's package-generation/global-cache-cleanup postbuild actions; no such project changes are included in this PR.
These are descriptive six-case diagnostics, not a 1,000-case throughput result or a statistical confidence claim. Host load, GC and run order can affect elapsed time; increases are retained in the tables. Managed allocation is not retained heap size. Nested phases overlap and must not be summed. Deltas use unrounded values; displayed values are rounded independently. Matching compiler output coverage does not establish arbitrary workflow execution or persistence equivalence.
Note
This change and description were prepared with AI assistance; the measurements and test results above were collected locally.