perf(data): bound lidar readers and lab session loading
This commit is contained in:
@@ -385,6 +385,7 @@ export function clearObservationReplayPreparation(
|
||||
export function useObservationSessions({
|
||||
limit = 100,
|
||||
scope = "all",
|
||||
pollingEnabled = true,
|
||||
replayEnabled = true,
|
||||
onReplayBegin,
|
||||
onReplayAccepted,
|
||||
@@ -393,6 +394,7 @@ export function useObservationSessions({
|
||||
}: {
|
||||
limit?: number;
|
||||
scope?: ObservationSessionScope;
|
||||
pollingEnabled?: boolean;
|
||||
replayEnabled?: boolean;
|
||||
/** Called only after the archive is ready, immediately before replacing the old viewer. */
|
||||
onReplayBegin?: (
|
||||
@@ -475,7 +477,7 @@ export function useObservationSessions({
|
||||
}, [refresh]);
|
||||
|
||||
useEffect(() => {
|
||||
if (state !== "ready") return;
|
||||
if (!pollingEnabled || state !== "ready") return;
|
||||
let disposed = false;
|
||||
let timer = 0;
|
||||
const poll = async () => {
|
||||
@@ -488,7 +490,7 @@ export function useObservationSessions({
|
||||
disposed = true;
|
||||
window.clearTimeout(timer);
|
||||
};
|
||||
}, [loadCatalog, state]);
|
||||
}, [loadCatalog, pollingEnabled, state]);
|
||||
|
||||
const executeReplay = useCallback(async (
|
||||
session: ObservationSessionSummary,
|
||||
|
||||
Reference in New Issue
Block a user