Skip to content

perf: hand out the cached dataset on an empty search - #116

Merged
funkadelic merged 2 commits into
mainfrom
perf/share-the-cached-dataset-on-an-empty-search
Oct 1, 2026
Merged

funkadelic merged 2 commits into
mainfrom
perf/share-the-cached-dataset-on-an-empty-search

Conversation

@funkadelic

@funkadelic funkadelic commented Oct 1, 2026 •

Copy link
Copy Markdown
Owner

clearing a search reuses the sorted order already worked out instead of rechecking every row


Summary by cubic

Clearing a search now reuses the cached dataset instead of recopying every row, so the sort cache can skip its subset walk on an empty term.

  • getCities and getFilms now return the frozen cached array for the empty search term instead of a copy.
  • loadEnvelope freezes the cached array, since callers now share it and a mutation would reorder every later caller's rows.
  • Public result types are now readonly to reflect that callers don't own a mutable array.

Written for commit 236e7b4. Summary will update on new commits.

Review in cubic

@codecov

codecov Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (a847aa9) to head (236e7b4).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #116   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           48        48           
  Lines          773       773           
  Branches       145       145           
=========================================
  Hits           773       773           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@codspeed

codspeed Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 27 untouched benchmarks


Comparing perf/share-the-cached-dataset-on-an-empty-search (236e7b4) with main (a847aa9)

Open in CodSpeed

@codecov

codecov Bot commented Oct 1, 2026

Copy link
Copy Markdown

Bundle Report

Changes will increase total bundle size by 11 bytes (0.0%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
yart 5.04MB 11 bytes (0.0%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: yart

Assets Changed:

Asset Name Size Change Total Size Change (%)
assets/src-*.js 21 bytes 262.11kB 0.01%
assets/movies-*.js -5 bytes 1.94kB -0.26%
assets/index-*.js -5 bytes 1.64kB -0.3%

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown

Lighthouse, median of 3 mobile runs

Page Score FCP LCP TBT CLS Speed Index
Cities 100 1.1s 1.4s 20ms 0.000 1.1s
Films 94 1.1s 3.0s 4ms 0.000 1.1s

Full reports

@funkadelic funkadelic self-assigned this Oct 1, 2026
@funkadelic
funkadelic marked this pull request as ready for review October 1, 2026 02:37

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 8 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread docs/adr/0009-cold-sort-across-frames.md Outdated
@sonarqubecloud

sonarqubecloud Bot commented Oct 1, 2026

Copy link
Copy Markdown

@funkadelic
funkadelic merged commit 09d0790 into main Oct 1, 2026
16 checks passed
@funkadelic
funkadelic deleted the perf/share-the-cached-dataset-on-an-empty-search branch October 1, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant