perf(map): analyze only the selected theme
This commit is contained in:
@@ -1791,7 +1791,7 @@ export function MapWorkspace({
|
||||
})
|
||||
}
|
||||
|
||||
const loadAllThemeResults = async (bbox: VectorSelectionBBox, areaId?: string) => {
|
||||
const loadSelectedThemeResult = async (bbox: VectorSelectionBBox, areaId?: string) => {
|
||||
let resolvedZones = selectedCoverageZones
|
||||
const scale = selectionAnalysisScale(bbox)
|
||||
if (analysisMode === 'current' && selectedProjectId) {
|
||||
@@ -1852,7 +1852,7 @@ export function MapWorkspace({
|
||||
}
|
||||
const availableThemes: Array<MapThemeQuery<DataThemeId>> = []
|
||||
const resultFeatureLimit = selectionFeatureLimit(bbox)
|
||||
for (const theme of DATA_THEMES) {
|
||||
for (const theme of [activeTheme]) {
|
||||
const dataset = themeDatasetMap[theme.id]
|
||||
const partitioned = Boolean(
|
||||
dataset
|
||||
@@ -1904,7 +1904,7 @@ export function MapWorkspace({
|
||||
setMapAnalysisDurationMs(null)
|
||||
setSelectionBbox(bbox)
|
||||
const tasks: Array<Promise<unknown>> = analysisMode === 'current'
|
||||
? [loadAllThemeResults(bbox, areaId)]
|
||||
? [loadSelectedThemeResult(bbox, areaId)]
|
||||
: []
|
||||
const activeDatasetSupportsSelection = !activeThemeDataset
|
||||
|| persistedDatasetSupportsSelection(activeThemeDataset, bbox)
|
||||
@@ -2576,7 +2576,7 @@ export function MapWorkspace({
|
||||
) : mapSelectionLoading || themeResultsLoading || temporalComparisonLoading ? (
|
||||
<div className="geo-results-loading" role="status">
|
||||
<span />
|
||||
<strong>Officiële bronnen worden begrensd geladen en geanalyseerd…</strong>
|
||||
<strong>De gekozen officiële bron wordt begrensd geladen en geanalyseerd…</strong>
|
||||
</div>
|
||||
) : (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user