Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

High Memory Usage #274

Open
mostafa-khaldi opened this issue Oct 3, 2024 · 1 comment
Open

High Memory Usage #274

mostafa-khaldi opened this issue Oct 3, 2024 · 1 comment

Comments

@mostafa-khaldi
Copy link

I am experiencing an unusual spike of memory usage, previously I was using nostr-tools to manage my content, now I have migrated to NDK and this issue appears, knowing I am enabling the outbox model and using Dexie cache

const ndkInstance = new NDK({
  explicitRelayUrls: relaysOnPlatform,
  enableOutboxModel: true,
  mutedIds: bannedList,
});
await ndkInstance.connect();
ndkInstance.cacheAdapter = new NDKCacheAdapterDexie({ dbName: "ndk-store" });

Any idea of what causes it?

@mostafa-khaldi mostafa-khaldi changed the title High Memory usgae High Memory Usage Oct 3, 2024
@mostafa-khaldi
Copy link
Author

mostafa-khaldi commented Oct 6, 2024

@pablof7z For more details of what the app is doing, i have a page where I subscribe to a filter (basically for notes) and when parsing the notes content it fetches the corresponding data such as npubs/nevents ..etc using a subscription as well, the app works normally for awhile until it experiences a spike of memory suddenly, and when refreshing the page, it happens instantly, I have run multiple tests to see what’s causing this issue including running the ndk instance alone without actual graphics rendering, and it turns out the issues appears again when starting the app and keeps increasing,
So does the NDK fetches and stores data without requesting or am I doing something wrong here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant