BaryoDev / BaryoDev/barakoCMS

Public list: one round trip for the count and the page

Open
#508 1 comment 0 reactions 1 assignee Claimed by @arnelirobles View on GitHub
core enhancement up-for-grabs
Dominant language
C#
Stars
6
Forks
7
Avg merge
4h 21m
Merged PRs (30d)
307

Description

`GET /api/public/{type}` runs `CountAsync` and then `ToListAsync` for one page, two round trips per request (`barakoCMS/Features/Public/Endpoints.cs`, the list handler). Marten's batched querying collapses them into one and does not care about the expression shape, so it works with the runtime `MatchesSql` and `OrderBySql` fragments that ruled out compiled queries in #103.

Done when the list handler issues one batch, a test proves the count and the page still agree, and a before-and-after timing is in the PR. If the batch API refuses `MatchesSql`, say so here and close.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.