Repository navigation
perf(dataflow): avoid repeated flow index scans - #1109
cookingwithvlad-del wants to merge 1 commit into
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
No actionable comments were generated in the recent review.
|
|
Adapted The ordinary JSON case retains 87 focused tests pass. Sixteen complete before/after results for ordinary inputs, including invalid endpoints, repeated values and empty flows, match. No Dataflow throughput benchmark was performed. The combined adaptation passed 3,481 general tests (134 conditional skips), 315 Chrome tests (10 skips) and 56 final package checks. Installation readback matches all 215 managed files; Node 22/26 compiler/CLI and previous-customization probes pass. The retained MIT base and the adapted Apache-2.0 portions keep their respective notices. BlueboxC |
tt-a1i
left a comment
There was a problem hiding this comment.
Agent-assisted review at 34a4d345e159f311e272af12387cad2fe0a4d416, compared with dev e837dc4. Source and supplied evidence inspected; no local test rerun in this pass.
This narrow indexed-iteration change is worth taking: it removes a redundant search and makes each diagnostic belong to the actual flow occurrence without adding state. Scope agreed; no separate issue or throughput benchmark is needed for this small slice. The added public-CLI check usefully protects /flows/2/to and its fix targets. Please describe the repeated-reference JavaScript API case precisely: entries intentionally reports positions 0 and 2, whereas indexOf reported position 0 twice; ordinary JSON behavior is preserved. BlueboxC’s fork result is helpful corroboration rather than upstream test evidence. Integrate current dev, refresh the canonical ZIP and obtain relevant green CI before final acceptance; do not advertise an unmeasured Dataflow speedup.
|
Thank you for #1109 and #1106. We have now weighed both against ongoing maintenance cost and would like to retain both narrow changes: #1109 removes an unnecessary lookup without adding state; #1106 keeps its precomputed indexes local to a compile and preserves the existing output contract. Neither should be advertised as an established end-to-end Agent generation speedup. For both PRs, the remaining contributor action is one explicit personal-review confirmation and AI-use disclosure covering the submitted changes. The assistance information already present can be reused; please confirm only after actually reviewing and understanding the changes. Please also synchronize current dev and rebuild the canonical ZIP, which is currently failing freshness checks, then obtain final-head CI. No new issue, five-project generation matrix, additional optimization candidates, or broad defensive refactor is requested. Existing focused checks and equivalent-output/stress evidence remain usable at their recorded revisions. We will keep these pending rather than merge before the contributor responsibility and packaging requirements are satisfied. Thank you for keeping the changes small. |
Problem and value
flowList.indexOf(flow)while traversing the same flow array, causing repeated linear scans and quadratic index-lookup work. Iterating withentries()retains the same diagnostic indices with constant-time index access.test/dataflow-automatic-layout.test.mjsverifies unknown-endpoint diagnostics retain the correct/flows/2/topath and actionable fixes.AI assistance and accountability
Stability impact
Tests run
Comparison base
10b4dd5c(dev) and candidate34a4d345.npm run test:focus -- test/dataflow-automatic-layout.test.mjs test/layout-rules.test.mjs— PASS (181 tests, 0 skipped). The added regression protects the user-facing diagnostic path while existing renderer validation cases verify behavior remains intact. Performance impact is not benchmarked.