Fix performance related to having 100s of requests (#123)

This commit is contained in:
Gregory Schier
2024-10-08 15:16:57 -06:00
committed by GitHub
parent 4b7712df80
commit c7eccddac9
34 changed files with 456 additions and 423 deletions

View File

@@ -11,7 +11,7 @@ export function usePinnedGrpcConnection(activeRequest: GrpcRequest) {
fallback: null,
namespace: 'global',
});
const connections = useGrpcConnections(activeRequest.id);
const connections = useGrpcConnections().filter((c) => c.requestId === activeRequest.id);
const activeConnection: GrpcConnection | null =
connections.find((r) => r.id === pinnedConnectionId) ?? latestConnection;