Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Large memory consumption by frontend #104

Closed
nazar-pc opened this issue Mar 20, 2022 · 5 comments
Closed

Large memory consumption by frontend #104

nazar-pc opened this issue Mar 20, 2022 · 5 comments
Assignees
Labels
improvement it is already working, but can be better

Comments

@nazar-pc
Copy link
Member

My desktop app is running for a few days now (laptop went to sleep a few times) and I noticed that WebKitWebProcess process consumed 1.5G or RAM. That is the process responsible for rendering UI on Linux.

I don't think for the complexity of the UI that we have 1.5G is reasonable. Might be some memory leak in Polkadot.js again, but either way it is much more than subspace-desktop process (which is node, farmer and Tauri's backend all combined, 359.1M).

Also maybe we can un-load UI somehow completely if app is minimized?

@nazar-pc nazar-pc added the improvement it is already working, but can be better label Mar 21, 2022
@ozgunozerk
Copy link
Contributor

It also started to create inconvenience when building the application with yarn build. I had to increase the maximum allocated space for javascript to 8GB to not get build errors related to memory usage. Might be related to this.

@nazar-pc
Copy link
Member Author

Builds are unrelated to runtime memory usage

@1devNdogs
Copy link
Contributor

I will check if we can do some UI un-load on minimize.

I think several things can be checked on the vue/quasar and Polkadot.js side. As we have been advancing with the app I have been writing down some waiting for the moment to apply them.

  • Check Vue components and correct use of: computed, mounted/unmounted, reactive data, event Emitter.
  • Polkadot.js from client.ts could be improved in several ways:
    • Block subscription and event filter can be improved a lot.
    • On Dashboard mounted, the API for the public endpoint must be disconnected.
    • If it is not a first launch app, again, the API for the public endpoint must be disconnected or maybe not initialized.
  • Update Polkadot packages, fix any deprecated usage.

I'd like to check this out after #103, to work on the latest versions of tauri.

@1devNdogs 1devNdogs self-assigned this Mar 23, 2022
@nazar-pc
Copy link
Member Author

When things start, it is not so bad, under 300M consumed by the process. So if it uses over 5x of that something must be leaking over time I think.

@isSerge
Copy link
Contributor

isSerge commented Jun 9, 2022

Can't reproduce on v0.6.3

@isSerge isSerge closed this as completed Jun 9, 2022
Repository owner moved this from Todo to Done in Product Engineering Jun 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
improvement it is already working, but can be better
Projects
Archived in project
Development

No branches or pull requests

4 participants