Hot-loop performance: per-record allocations in Store and RecordValidator - #4603
Open
lbwexler wants to merge 2 commits into
Open
Hot-loop performance: per-record allocations in Store and RecordValidator#4603lbwexler wants to merge 2 commits into
lbwexler wants to merge 2 commits into
Conversation
This was referenced Aug 21, 2026
…rdValidator * Store.updateData / modifyRecords: summary-record membership now checked against a Set of summary ids hoisted once per call - previously a lodash matcher was allocated per updated record (even with no summary records), and updateData's add loop evaluated the summaryRecordIds getter (a fresh Set + map) once per added record. * RecordValidator builds record.getValues() once per validateAsync run and threads it through evaluateRuleAsync/ruleIsActive - previously the full values object was allocated twice per rule per field.
lbwexler
force-pushed
the
hot-loop-perf-3
branch
from
August 21, 2026 14:44
8fd052a to
243642c
Compare
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.
Third batch in the stack (#4600 → #4602 → this) - pure internal reorg, no API or behavior changes.
{id}matcher was allocated per updated record (even whensummaryRecordswas null - the overwhelmingly common case), and updateData's add loop evaluated thesummaryRecordIdsgetter - a fresh Set plus a map - once per added record (a 10k-row add allocated 10k Sets).record.getValues()(an object allocation over every Field) is built once pervalidateAsyncrun and threaded throughevaluateRuleAsync/ruleIsActive- previously rebuilt twice per rule per field.Validated in Toolbox: tree grid load/reload with summary row, inline-edit commit via
modifyRecords+ validation + revert. Zero console errors.