perf: retain only current imagery thumbnail intent

This commit is contained in:
Kevin Rajan committed 2026-09-29 13:38:36 -05:00
1 parent 3b3bf29f9b
commit 60bf311f90
1 file changed
+12 -7
+12 -7
View File
@@ -568,12 +568,14 @@ export function createRecentImageryLayer({
const list = stripList();
if (!list.length) return;
reconcileFocus();
thumbnails.requestOrdered(list, _box, {
focusIndex: Math.max(0, focusIndexIn(list)),
firstVisible: _visible.first,
lastVisible: _visible.last,
extra: 2,
});
const wanted = new Set(
thumbnails.requestOrdered(list, _box, {
focusIndex: Math.max(0, focusIndexIn(list)),
firstVisible: _visible.first,
lastVisible: _visible.last,
extra: 2,
}) || [],
);
for (const key of new Set([
_assigned.a,
_assigned.b,
@@ -581,8 +583,11 @@ export function createRecentImageryLayer({
_followKey,
])) {
const candidate = candidateFor(key);
if (sourceOn(candidate)) thumbnails.request(candidate, _box, 0);
if (!sourceOn(candidate)) continue;
thumbnails.request(candidate, _box, 0);
wanted.add(candidate.key);
}
thumbnails.retain?.(wanted);
}
function resetCatalog() {