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

How is Notable 60.2MB? #786

Closed
afonsomatos opened this issue Aug 17, 2019 · 2 comments
Closed

How is Notable 60.2MB? #786

afonsomatos opened this issue Aug 17, 2019 · 2 comments

Comments

@afonsomatos
Copy link

I'm downloading Notable, and it weights a staggering 60.2Mb. Can't we do better?

@IvanFon
Copy link

IvanFon commented Aug 18, 2019

I believe most of this is due to Electron's overhead (it includes most of Chromium). I don't think it's possible to reduce this very much without a significant amount of work, and ~30 mb seems to be as low as it can get. This issue is a bit old, but has some more info: electron/electron#2003

I think the developer of Notable has already done some work to make it smaller, such as removing uneeded dependencies.

@fabiospampinato
Copy link
Member

fabiospampinato commented Aug 19, 2019

@afonsomatos I think you're referring to the dmg version of the app, which is actually compressed.

As @IvanFon correctly pointed out most of that comes from Electron itself, so we can't really do much about it.

Just to give some numbers:

Once getting the Notable.app file out of the dmg that weighs about 159MB. By running the following:

cd Notable.app/Contents/Resources
du -shc app.asar

We can measure all the code that we are actually shipping, app.asar weighs 10MB. We can reduce it considerably, but keep in mind that mermaid by itself, even once minified, weighs almost 1MB, so we can't really get app.asar down to 100kb or something in the near future. In the long term we could ship these expensive features as optional external plugins #128.

In any case only 10MB out of the 159MB I have some control over, the rest comes from Electron.

There are multiple ways in which the size could be reduced:

  • At some point perhaps Electron/Chromium will become more lightweight, right now I think they are focusing more on closing the gap in performance between native apps and web apps.
  • At some point perhaps there will be a more efficient Electron alternative and we could consider using that instead, but I think this is highly unlikely to happen.
  • At some point we will make a PWA Web app (PWA) #83, which you could then run directly in the browser or install in your computer as a PWA via the browser (currently I think only Chrome offers this feature), this will kind of remove Electron out of the picture entirely.

The situation isn't as bad as it seems though, this is how much other popular, mostly based on Electron, apps weigh:

  • Atom: 582MB
  • VSCode: 214MB
  • Evernote: 163MB
  • Boostnote: 300MB
  • Notion: 156MB
  • Slack: 192MB

As you can see Notable is actually at the lowest end of the spectrum already.

On the other end you can also find the built-in Notes.app app weighing 14MB, but that's a bit like comparing apples to oranges, Notes.app weighs so little because most of its rendering stack is shipping with the OS, while we are bringing our own.

I'm closing this as reducing bundles' sizes is already tracked in other various issues.

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

No branches or pull requests

3 participants