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

Possible strategy for "thinning" AppImages #23

Open
probonopd opened this issue May 21, 2019 · 1 comment
Open

Possible strategy for "thinning" AppImages #23

probonopd opened this issue May 21, 2019 · 1 comment
Labels

Comments

@probonopd
Copy link
Contributor

probonopd commented May 21, 2019

Here is one possible strategy for "thinning" AppImages so that they contain only the subset of Python and other files that is actually needed. Using this, I could reduce the size of TruFont from approximately 120 MB to just one third, under 40 MB.

mkdir squashfs-root
sudo mount -t tmpfs tmpfs squashfs-root/ -o strictatime,nodiratime 
./TruFont-*-x86_64.AppImage --appimage-extract
touch test
./squashfs-root/AppRun
# Kill
find squashfs-root/ -mindepth 3 -not -anewer test -not -path '*/share/icons/*' -not -path '*/share/applications/*' -not -path '*/share/metainfo/*' -delete || true
find squashfs-root/ -type d -empty -delete
./squashfs-root/AppRun 
appimagetool ./squashfs-root

The downside is that you need to manually "exercise" all parts of the application, so that the mechanism detects all files that are actually needed.

@probonopd probonopd added the idea label May 21, 2019
@TheAssassin
Copy link
Member

Doesn't seem safe at all. And requires running an AppImage, which isn't possible during a plugin run. I think that's something to put in the docs as "potential optimization", but then again, this doesn't seem like something you'd want to tell people to use and then use up hours to support afterwards...

The plugin has actually received some safe performance improvements recently. Simple CLI AppImages like appimagelint have a size of 25 MiB, which is very good given we bundle an entire Python interpreter environment plus the software and a few dependencies.

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

No branches or pull requests

2 participants