Skip to content

HF-150: run the performance workflows against 100k-row scale scenarios - #1838

Open
marcin-kordas-hoc wants to merge 5 commits into
feat/hf-150-instruction-countfrom
feat/hf-150-scale-100k
Open

marcin-kordas-hoc wants to merge 5 commits into
feat/hf-150-instruction-countfrom
feat/hf-150-scale-100k

Conversation

@marcin-kordas-hoc

@marcin-kordas-hoc marcin-kordas-hoc commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Context

The PR runs the two performance workflows against new 100k-row scale scenarios in the paired tests branch. It has no file changes of its own: it holds one empty commit, so that CI pairs it with the tests branch of the same name, and merges of its base.

  • Why: the largest scenario so far had 10k rows, so work that grows faster than linearly with the sheet could pass unnoticed.
  • What changed: nothing in this repository. The scenarios are in hyperformula-tests [Security] Bump tar from 2.2.1 to 2.2.2 #102: build a 100k-row fan-out sheet, and one edit with 100k dependents (wall-clock); the same at 30k rows (instruction count).
  • Result: the performance comment and the instruction-count summary of this PR include the scale scenarios.

How did you test your changes?

  • Paired tests branch: feat/hf-150-scale-100k in hyperformula-tests.
  • Measured before choosing the sizes: building the 100k-row sheet took 5.2–5.5 s and one edit 0.2–0.3 s. One 100k process under callgrind took about 12 minutes locally, so the instruction count uses 30k. Details are in the tests PR.
  • CI on this PR at b570f2270 (no engine code changed, so every verdict should be ok):
Job Result Time Before (#1814)
Test performance 15 of 15 ok, both 100k scenarios included 18m5s 11m47s
Count instructions largest change 0.00021% over 15 scenarios 19m53s 10m37s

The counting steps took 6m15s per side, against about 4m35s before. Installing valgrind took 5m52s in this run and 9 s on #1814, which explains most of the rest.

  • At f802dc5 (tests c9a81cc), Test performance gave 14 ok and 1 inconclusive: Sheet A: change value, add/remove row/column, with a base CV of 27%.

Compatibility with Excel and Google Sheets

Not applicable.

Public API changes

None.

Out of scope and follow-ups

  • Cross-sheet, volatile, undo and redo, and spill scenarios.
  • Sheets above 100k rows need maxRows raised further; the scenarios set it to 100000.

Types of changes

  • Breaking change (existing functionality no longer works as before) – agreed with the maintainers
  • New feature or improvement (a non-breaking change that adds functionality)
  • Bug fix (a non-breaking change that fixes an issue)
  • Additional language file, or a change to an existing language file (translations)
  • Change to the documentation

Tests only, in the paired branch.

Related issues

  1. HF-150 (internal task)

Checklist

🤖 Generated with Claude Code


Note

Low Risk
No engine, API, or in-repo CI config changes—only an empty commit to exercise expanded external performance scenarios.

Overview
This PR does not change any files in HyperFormula—it is an empty commit so CI can pair this branch with the matching feat/hf-150-scale-100k branch in hyperformula-tests.

That pairing extends the existing Test performance and Count instructions workflows to new 100k-row scenarios (previously the largest was 10k), so regressions that grow faster than linearly with sheet size are harder to miss. The scenarios themselves live in hyperformula-tests (#102): a 100k-row fan-out sheet with wall-clock timing on one edit with 100k dependents, and a 30k-row variant for instruction counting (100k under callgrind was too slow for CI).

Expect longer workflow runs and performance/instruction summaries that include the new scale cases; engine behavior is unchanged, so verdicts should remain ok unless the paired tests branch introduces instability.

Reviewed by Cursor Bugbot for commit ffb2469. Bugbot is set up for automated code reviews on this repo. Configure here.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
hyperformula-docs f87bf76 Commit Preview URL

Branch Preview URL
Nov 04 2026, 10:45 AM

@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Performance comparison of head (f87bf76) failed; see the job log.

@marcin-kordas-hoc
marcin-kordas-hoc marked this pull request as ready for review October 23, 2026 08:20
sequba added a commit that referenced this pull request Oct 26, 2026
…rmula builder review (#1839)

### Context

The PR fixes the `hyperformula-ui` issues found while reviewing the
Handsontable formula builder (handsontable/handsontable#13172).

- **Why:** each one leaves a visible defect in a host grid or forces the
host into a workaround.
- **What changed:** one commit per fix, all in `hyperformula-ui/`.

| Issue | Now |
|---|---|
| Idle formula bar colors references differently from the editor after a
named expression | Same named-expression step as the editor; redraws
when names change |
| A removed named expression stays colored after `undo()`, `redo()`,
`changeNamedExpression()`, `removeSheet()` | Cache also cleared on
`valuesUpdated`, `sheetRemoved` and every `setValue` |
| `destroy()` throws after the host destroyed the engine, leaking DOM
and styles | Builder and editor run every teardown step; first error
rethrown |
| No way to place popups in a shadow root or iframe | `rootDocument` and
`portalParent` options; listeners (scroll in a shadow root included),
hit tests and focus checks follow the element's own document |
| A missing or invalid container selector throws from the constructor;
selectors miss a shadow-root grid | Warns once and uses the default
placement; selectors also resolve in the grid's shadow root |
| Address box reports success when the grid cannot select the cell |
`setActiveCell`/`setSelection` may return `false`; announced as "Cannot
select B7", not as invalid |
| A long run of `'` tokenizes in quadratic time | One linear pass, same
tokens |
| An engine without the editor's `sheetId` makes every keystroke throw |
Treated as a sheet with no local names and no dimensions |
| Error value and error popup title use different fonts | Both read
`--hfe-error-font-family`, falling back to `--hfe-font-family` where the
error renders |
| Ctrl/Cmd+Enter only inserts a newline | Calls optional
`adapter.commitFill` or `onCommitFill`; Alt+Enter inserts a newline |
| Reference colors fail 4.5:1, and some pairs look alike | All clear
4.5:1; every pair at least 10 apart (OKLab ΔE×100) |
| `color-scheme` set on every element through `[class*=hfe-]` | Not set
at all: every element inherits the host page's scheme |
| Labels and announcements are English only | `phrases` option, English
defaults in `DEFAULT_PHRASES` |

- **Result:** the Handsontable plugin drops its style overrides and
gains translations, shadow-root support and fill commit (paired commits
on #13172).

### How did you test your changes?

Every fix has a test that fails without it.

| Command | Result |
|---|---|
| `npm run build:ui` | Builds |
| `npm run typecheck` (after `npm run bundle-all`) | Passes |
| `npm run lint` | 0 errors |
| `npm run test:ui` | 1147 tests passed |
| `npm run test:e2e` | 1 passed |
| Handsontable plugin against this build: unit tests, Playwright
`formula-builder` specs, axe scan | 486 (with i18n), 53 and 9 passed |

Checked in Chromium on the Handsontable demo against 0.3.5: error-title
font, `color-scheme` with the OS in the other scheme, Ctrl/Cmd+Enter
fill, undo of a named expression, a reference drag in a shadow root, the
error popup in an iframe.

### Compatibility with Excel and Google Sheets

Not applicable. The change is in the formula editor UI and cannot affect
calculation results.

### Public API changes

All in `hyperformula-ui`:

- `FormulaBuilderOptions`: `rootDocument`, `portalParent`.
- `FormulaEditorOptions` (and `FormulaBuilderOptions`):
`onCommitFill(value)`, `phrases`; `FormulaEditor.phrases`.
- `IGridAdapter`: optional `commitFill(value)`; `setActiveCell` and
`setSelection` return `boolean | void`.
- `HyperFormulaLike`: `on`/`off` for `sheetRemoved`.
- New exports: `Phrases` (includes `cellUnavailable`),
`DEFAULT_PHRASES`, `StyleRoot`, `AddressBoxNavigation`.
- `FormulaBarCellOptions.tokenPostProcess` and `phrases`,
`FormulaBarCell.refresh()`, `FormulaBarAddressBoxOptions.phrases` and
`onUnavailableTarget`; its navigation callbacks may return
`"unavailable"`.
- `StyleInjector.inject(root?)` / `release(root?)`; `LiveRegion` accepts
a `ShadowRoot`.
- CSS: `--hfe-error-font-family`; new `--hfe-ref-1..8` defaults.

Not breaking, though some defaults change (reference colors, the error
cell's font, the `color-scheme` scope, no constructor throw). The
package is 0.x and no released consumer depends on these defaults. The
changelog says how to keep each old default.

### Out of scope and follow-ups

None. Keeping all fixes in one PR was agreed by the PR author. The
popups staying over frozen panes is recorded as the intended behavior in
`dev-docs/SPEC.md`.

The License Compliance (FOSSA) check also fails on #1838 and #1841; it
is not related to this change.

### Types of changes
- [ ] Breaking change (existing functionality no longer works as before)
– agreed with the maintainers
- [x] New feature or improvement (a non-breaking change that adds
functionality)
- [x] Bug fix (a non-breaking change that fixes an issue)
- [ ] Additional language file, or a change to an existing language file
(translations)
- [x] Change to the documentation

### Related issues
1. DEV-3554

### Checklist
- [x] My pull request meets the [Definition of
Done](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DEFINITION-OF-DONE.md).
External contributors: see also [Contributing to
HyperFormula](https://handsontable.com/docs/hyperformula/guide/contributing.html).
- [x] I have signed the [Contributor License
Agreement](https://goo.gl/forms/yuutGuN0RjsikVpM2).
- [x] I read my own diff end to end before requesting a review.
- [x] I added a
[CHANGELOG.md](https://github.com/handsontable/hyperformula/blob/develop/CHANGELOG.md)
entry, written by [the changelog
rules](https://github.com/handsontable/hyperformula/blob/develop/dev-docs/DOC-STANDARDS.md#the-changelog)
– or none is needed (docs, tests or tooling only).
- [x] I updated the documentation and JSDoc to match the change.
- [ ] Breaking change only: I added a section to the migration guide.
- [x] I updated the `dev-docs/` pages this change affects – or none
needed it.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Touches core editing, adapter contracts, and DOM/event wiring across
iframes and shadow roots; behavior changes (fill commit, ref picking,
destroy) affect all grid hosts but are additive or bug fixes with
documented API extensions.
> 
> **Overview**
> **hyperformula-ui** gains host-aware embedding (`rootDocument`,
`portalParent`), i18n (`phrases` / `DEFAULT_PHRASES`), and several
editor/adapter fixes aimed at Handsontable integration.
> 
> **Embedding & DOM:** Popups, live region, and styles can target an
iframe document or shadow root; `DomRangePicker`, `ErrorPopup`, and
editor scroll/resize listeners use the element's window/document,
`composedPath()` for hits, and `deepActiveElement` instead of global
`document`. Style injection is ref-counted per `StyleRoot`. Missing
constructor container selectors warn and fall back; `attach*` still
throws.
> 
> **Editing behavior:** Grid picks replace the whole cell/range
reference under the caret; Ctrl/Cmd+Enter commits via optional
`commitFill` / `onCommitFill` (Alt+Enter for newline). Address box
honors `setActiveCell`/`setSelection` returning `false` with
`"unavailable"` announcements. Named-expression coloring stays in sync
(cache invalidation on more HF events, bar idle view uses
`tokenPostProcess` + `refresh()`). `destroy()` runs all teardown steps
via `runAll` even if HF is already gone.
> 
> **Theming & perf:** Reference colors and error font
(`--hfe-error-font-family`) updated; package no longer forces
`color-scheme`. Lexer uses linear `buildQuotedSheetEnds` for quoted
sheet names; missing `sheetId` no longer throws on every keystroke.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
8839a57. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->

---------

Co-authored-by: Kuba Sekowski <jakub.sekowski@handsontable.com>
@codecov

codecov Bot commented Nov 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.36%. Comparing base (2f13c8b) to head (ffb2469).

Additional details and impacted files

Impacted file tree graph

@@                      Coverage Diff                       @@
##           feat/hf-150-instruction-count    #1838   +/-   ##
==============================================================
  Coverage                          97.36%   97.36%           
==============================================================
  Files                                209      209           
  Lines                              16524    16524           
  Branches                            3670     3636   -34     
==============================================================
  Hits                               16089    16089           
  Misses                               427      427           
  Partials                               8        8           
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cursor

cursor Bot commented Nov 4, 2026

Copy link
Copy Markdown

Bugbot is paused — on-demand spend limit reached

Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

This branch has not been deployed

No deployments
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