Eliminate frontend POI waterfall for faster initial load
Listing stream fires immediately on auth without waiting for POI fetch. POI distances are not needed for initial rendering and are only computed when user selects POI metric or sets travel filters. This saves ~200-500ms on initial load and keeps the stream on the cached Redis path.
This commit is contained in:
parent
3885fd52fe
commit
8ef6868881
2 changed files with 36 additions and 7 deletions
|
|
@ -69,12 +69,9 @@ export async function* streamListingGeoJSON(
|
|||
user: AuthUser,
|
||||
parameters: ParameterValues,
|
||||
onProgress?: (progress: StreamingProgress) => void,
|
||||
options?: { includePoiDistances?: boolean; signal?: AbortSignal },
|
||||
options?: { signal?: AbortSignal },
|
||||
): AsyncGenerator<PropertyFeature[], void, unknown> {
|
||||
const params = buildListingParams(parameters);
|
||||
if (options?.includePoiDistances) {
|
||||
params.include_poi_distances = 'true';
|
||||
}
|
||||
const queryString = buildQueryString(params);
|
||||
const url = queryString
|
||||
? `${API_ENDPOINTS.LISTING_GEOJSON_STREAM}?${queryString}`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue