mirror of
https://github.com/docmost/docmost.git
synced 2026-07-14 16:26:45 +10:00
perf(base): batch page-cell resolution via microtask loader
Per-cell useResolvedPages([id]) calls each mounted with a unique React Query key, so a grid with 20 page-typed cells fired 20 requests on first paint. A shared loader now accumulates incoming ids within a microtask, fires a single POST for the union, and fans the subset each caller asked for back to them. Cells keep their own cache entry + null handling; they just share the underlying network call. Also renames /bases/pages/resolve → /bases/pages/expand — the old name collided with other "resolve" semantics in the codebase.
This commit is contained in:
@@ -143,7 +143,7 @@ export class BaseController {
|
||||
}
|
||||
|
||||
@HttpCode(HttpStatus.OK)
|
||||
@Post('pages/resolve')
|
||||
@Post('pages/expand')
|
||||
async resolvePages(
|
||||
@Body() dto: ResolvePagesDto,
|
||||
@AuthUser() user: User,
|
||||
|
||||
Reference in New Issue
Block a user