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

Large memory footprint while idle #379

Closed
ebeloded opened this issue Apr 3, 2019 · 3 comments · Fixed by #487
Closed

Large memory footprint while idle #379

ebeloded opened this issue Apr 3, 2019 · 3 comments · Fixed by #487

Comments

@ebeloded
Copy link
Contributor

ebeloded commented Apr 3, 2019

Yoroi extension consumes a lot of system resources even without the app being opened. Here are two Chrome Task Manager screenshots of freshely launched browser:

image

image

On the windows machine the app wasn't even opened yet - the extension was installed automatically for my google account and immediately went to the top of the memory footprint chart.

We need to investigate this and make sure that the memory footprint is tamed. The extension should consume a nominal amount of resources while the app is inactive.

@SebastienGllmt
Copy link
Contributor

Interesting. I assume this is because background.pug loads vendor.js which is ~18MiB (see here).

Shrinking the size of this file in any reasonable way requires upgrading to webpack v4 which is a task I'm actively working on.

However, background definitely doesn't need all of vendor.js. It only depends on bluebird and a single function from lodash. We'll see how much that improves the situation.

@ebeloded
Copy link
Contributor Author

ebeloded commented Apr 3, 2019

Glad you're working on Webpack 4. Switching made a big difference in the project I worked on before.

Yeah, I think that we need to implement code splitting and only include the essentials on the background page and load the rest dynamically. Even the use of bluebird and lodash, given that we work in the modern Chrome environment, sounds like an overkill.

But more importantly, why is vendor.js 18MB? What's in there?

Combined with 3.6MB of yoroi.bundle.js we load more than 21MB on the page, which is quite a lot.

I checked AdaLite - the app seems to have the same functionality with less than 400KB of js. Are we doing something on the client they do on the server? What makes such a difference?

@SebastienGllmt
Copy link
Contributor

  1. Webpack v3 blocks us from optimizing some of these files
  2. We have dependencies such as PDF importing and PDF generation which take a non-trivial amount of space

We'll see how much space we take after webpack v4 migration is done.

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

Successfully merging a pull request may close this issue.

2 participants