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

Snap: initialize db and icons for faster startup and remove fonts #2715

Merged
merged 2 commits into from
Mar 25, 2018

Conversation

3v1n0
Copy link
Contributor

@3v1n0 3v1n0 commented Mar 19, 2018

In order to improve the startup time for snapped applications we can generate the mime DB and the icon caches at snap build time. In order to do this, we can use snap composition to override the desktop-gtk{2,3} part, adding an install script which does this.
The remote part can't do this by default since it could break legacy applications providing such files but this won't be the case for electron apps.

At the same time, fonts can be removed if a desktop plug is required since /usr/share/fonts will be bind-mounted from system.

@3v1n0 3v1n0 force-pushed the snap-faster-startup branch 2 times, most recently from 2b5e1ea to eb3b06f Compare March 19, 2018 23:43
3v1n0 added 2 commits March 20, 2018 01:17
In order to improve the startup time for snapped
applications we can generate the mime DB and the
icon caches at snap build time.
In order to do this, we can use snap composition to
override the desktop-gtk{2,3} part, adding an install
script which does this.
The remote part can't do this by default since it
could break legacy applications providing such files
but this won't be the case for electron apps.
When the desktop-interface is used the snap has
access to the system fonts, so there's no point
of adding such files to the final snap.
@3v1n0 3v1n0 force-pushed the snap-faster-startup branch from eb3b06f to ce9739b Compare March 20, 2018 00:18
@develar
Copy link
Member

develar commented Mar 22, 2018

Thanks! I will merge PR on weekend, since I need to test it manually.

@develar develar merged commit 5f0dd86 into electron-userland:master Mar 25, 2018
@develar
Copy link
Member

develar commented Mar 26, 2018

electron-builder doesn't user snapcraft if nothing custom specified and x64 arch. Instead, template used (that built in-prior, e.g. https://github.com/electron-userland/electron-builder-binaries/releases/tag/snap-template-2). It means, that we need to apply this logic for our template and do not add it not required (since part of template app). I will rebuild templates this week.

@develar
Copy link
Member

develar commented Mar 26, 2018

electron-builder 20.8.0 released, template app updated.

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 this pull request may close these issues.

2 participants