perf improve

This commit is contained in:
Ren Amamiya
2023-09-27 08:32:19 +07:00
parent 1d93f8cf6a
commit b339e842ca
28 changed files with 521 additions and 942 deletions

View File

@@ -21,6 +21,7 @@ export const NDKInstance = () => {
);
// TODO: fully support NIP-11
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async function getExplicitRelays() {
try {
// get relays
@@ -62,7 +63,7 @@ export const NDKInstance = () => {
}
async function initNDK() {
const explicitRelayUrls = await getExplicitRelays();
const explicitRelayUrls = await db.getExplicitRelayUrls();
const instance = new NDK({
explicitRelayUrls,
cacheAdapter,