Remove dashboard-load timing instrumentation
The perf logs were temporary diagnostics used to identify that slow reloads were caused by a registered remote node timing out in /projects/across-nodes. Root cause is resolved and the short-circuit for zero-remote setups (already committed in 7ea60382a) remains. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,6 @@ import type { ProjectInfo } from "../api";
|
||||
import {
|
||||
fetchProjectsAcrossNodes,
|
||||
registerProject,
|
||||
reportDashboardPerf,
|
||||
unregisterProject,
|
||||
updateProject,
|
||||
type ProjectCreateInput,
|
||||
@@ -60,22 +59,13 @@ export function useProjects(): UseProjectsResult {
|
||||
|
||||
async function load() {
|
||||
setLoading(true);
|
||||
const t0 = performance.now();
|
||||
try {
|
||||
const data = await fetchProjectsAcrossNodes();
|
||||
const elapsed = Math.round(performance.now() - t0);
|
||||
const msg = `initial fetchProjectsAcrossNodes took ${elapsed}ms (${data.length} projects)`;
|
||||
console.log(`[useProjects] ${msg}`);
|
||||
reportDashboardPerf("[useProjects]", msg);
|
||||
if (!cancelled) {
|
||||
setProjects(data);
|
||||
setError(null);
|
||||
}
|
||||
} catch (err) {
|
||||
const elapsed = Math.round(performance.now() - t0);
|
||||
const msg = `initial fetch failed after ${elapsed}ms: ${err instanceof Error ? err.message : String(err)}`;
|
||||
console.warn(`[useProjects] ${msg}`);
|
||||
reportDashboardPerf("[useProjects]", msg);
|
||||
if (!cancelled) {
|
||||
setError(err instanceof Error ? err.message : "Failed to fetch projects");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user