Skip to content

Performance: Calculate table footer totals on the server - #378

Merged
priethor merged 2 commits into
mainfrom
priethor/add/server-table-calculations
Jun 26, 2026
Merged

Performance: Calculate table footer totals on the server#378
priethor merged 2 commits into
mainfrom
priethor/add/server-table-calculations

Conversation

@priethor

@priethor priethor commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

What

Closes #132.

Table calculation footers now request the rows endpoint for totals when the table uses server pagination. The footer shows totals for the full filtered and searched result set, not just the current page, and still falls back to the existing local calculation path when server-side totals are unavailable.

Why

This avoids fetching every page just to calculate footer values locally, which made the default table calculation path heavier than necessary.

How

  • Returning raw calculation values from the rows endpoint when callers request them.
  • Reusing the existing footer formatting so server and local totals display the same way.
  • Skipping row value hydration for plain count totals.

Testing Instructions

  1. Open a collection table with enough rows to paginate.
  2. Add a numeric table calculation, such as Sum, in the footer.
  3. Apply a filter that still leaves more rows than the current page.
  4. Move between pages and confirm the footer total stays the same.
  5. Check that the total reflects all matching rows, not only the visible page.

Screen recording

Grabacion.de.pantalla.2026-06-26.a.las.17.06.17.mov

@priethor priethor added type: enhancement Improvement to existing behavior. area: collections Fields, rows, views, DataViews, relations, rollups, formulas, and row properties. area: performance Performance budgets, profiling, benchmarks, and regressions. and removed type: enhancement Improvement to existing behavior. labels Jun 26, 2026
@priethor
priethor marked this pull request as ready for review June 26, 2026 15:10
@priethor priethor changed the title Calculate table footer totals on the server Performance: Calculate table footer totals on the server Jun 26, 2026
@priethor
priethor merged commit 4b1889c into main Jun 26, 2026
11 checks passed
@priethor
priethor deleted the priethor/add/server-table-calculations branch June 26, 2026 15:51
@github-actions github-actions Bot added this to the 0.2.0 milestone Jun 26, 2026
@priethor priethor removed the area: collections Fields, rows, views, DataViews, relations, rollups, formulas, and row properties. label Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: performance Performance budgets, profiling, benchmarks, and regressions. type: enhancement Improvement to existing behavior.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compute view totals on the server

1 participant