catalog-react: split entity list and count into parallel requests

Reapply the split-count concept on top of the refactored
useEntityListProvider (from #34324). The list fetch now uses
totalItems: 'exclude' to skip the expensive count, and a separate
useAsyncFn fetches the count only when filters change — page
navigation no longer re-runs the count query.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2026-05-21 17:02:49 +02:00
parent 2139bf53d1
commit d8757b158c
3 changed files with 141 additions and 76 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/plugin-catalog-react': patch
---
The entity list provider now fetches the entity list and the total count as two separate parallel requests when using cursor or offset pagination. The list query skips the expensive count computation (using `totalItems: 'exclude'`), so the table populates immediately. The count arrives asynchronously and updates the title. This significantly improves perceived latency for catalog page loads on large catalogs.