ui
This commit is contained in:
parent
6a8c3d1edc
commit
b0c7aeab32
File diff suppressed because one or more lines are too long
@ -190,7 +190,10 @@ export const searchGoogleMap = async (
|
|||||||
let idx = 0
|
let idx = 0
|
||||||
//const cachedLoc = async (title: string) => getStored(title, opts.store, MODULE_NAME)
|
//const cachedLoc = async (title: string) => getStored(title, opts.store, MODULE_NAME)
|
||||||
|
|
||||||
await enrichResults(results as GoogleMapResult[], index, opts)
|
// Optimization: Defer expensive enrichment (photos, meta) until AFTER filtering
|
||||||
|
// Only perform cheaper geo-enrichment (reverse geocoding) if needed for filtering
|
||||||
|
const preFilterOpts = { ...opts, resolve: [], meta: false, findEMail: false }
|
||||||
|
await enrichResults(results as GoogleMapResult[], index, preFilterOpts)
|
||||||
|
|
||||||
logger.debug(
|
logger.debug(
|
||||||
`search ${query} with ${params.ll} / ${params.searchFrom} @ ${opts.zoom} | ${results.length} results before filters`,
|
`search ${query} with ${params.ll} / ${params.searchFrom} @ ${opts.zoom} | ${results.length} results before filters`,
|
||||||
@ -313,7 +316,7 @@ const enrichResults = async (results: GoogleMapResult[], index: any, opts: IOpti
|
|||||||
logger.error(`Error retrieving photo data for ${entry.title}`, e)
|
logger.error(`Error retrieving photo data for ${entry.title}`, e)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ concurrency: opts.concurrency },
|
{ concurrency: 10 },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user