From e2508ad063d8d3caaff80f8a28b6ca6285c62fd1 Mon Sep 17 00:00:00 2001 From: Jon Staab Date: Tue, 12 Nov 2024 20:46:46 -0800 Subject: [PATCH] Stop loading profiles eagerly --- packages/app/src/context.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/app/src/context.ts b/packages/app/src/context.ts index 347c594..12cfb40 100644 --- a/packages/app/src/context.ts +++ b/packages/app/src/context.ts @@ -1,13 +1,12 @@ import {partition} from "@welshman/lib" import {defaultOptimizeSubscriptions, getDefaultNetContext as originalGetDefaultNetContext} from "@welshman/net" import type {Subscription, RelaysAndFilters, NetContext} from "@welshman/net" -import {WRAP, LOCAL_RELAY_URL, isEphemeralKind, isDVMKind, unionFilters} from "@welshman/util" +import {LOCAL_RELAY_URL, isEphemeralKind, isDVMKind, unionFilters} from "@welshman/util" import type {TrustedEvent, StampedEvent} from "@welshman/util" import {tracker, repository} from './core' import {makeRouter, getFilterSelections} from './router' import {signer} from './session' import type {Router} from './router' -import {loadProfile} from './profiles' export type AppContext = { router: Router @@ -26,11 +25,6 @@ export const getDefaultNetContext = (overrides: Partial = {}) => ({ tracker.track(event.id, url) repository.publish(event) - - // Eagerly load profiles since they're critical to UX - if (event.kind !== WRAP) { - loadProfile(event.pubkey) - } }, isDeleted: (url: string, event: TrustedEvent) => repository.isDeleted(event), optimizeSubscriptions: (subs: Subscription[]) => {