Reducing the size of AppImage

This subforum is specifically to discuss packaging issues on different platforms (windows, mac, linux), and using different packaging systems (conda, etc...)
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Reducing the size of AppImage

Post by looo »

It's disabled: weekly builds are done here:
https://github.com/looooo/freecad-feeds ... ild.sh#L40

The freecad variants stuff are experiments and is outdated.
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Reducing the size of AppImage

Post by sgrogan »

looo wrote: Sat Sep 28, 2019 5:55 pm The freecad variants stuff are experiments and is outdated.
Thanks, I've created a new desktop shortcut and set it to require admin to delete it. Perhaps now you won't have to keep refreshing my memory :oops:
What do you think of disabling the build by default in FreeCAD CMake?
"fight the good fight"
User avatar
looo
Veteran
Posts: 3941
Joined: Mon Nov 11, 2013 5:29 pm

Re: Reducing the size of AppImage

Post by looo »

sgrogan wrote: Sat Sep 28, 2019 6:04 pm Thanks, I've created a new desktop shortcut and set it to require admin to delete it. Perhaps now you won't have to keep refreshing my memory :oops:
What do you think of disabling the build by default in FreeCAD CMake?
Yes I am fine with outsourcing ship and plot finally. I will try take care of the external workbenches, so both work with latest FreeCAD. I had plans to optimize the plot module, but time is rare.

And sorry for my mess. I will try to clean the FreeCAD-conda repo a bit. Just for your information:
conda-forge/freecad-feedstock -> official releases
looooo/freecad-feedstock -> weekly builds

I did this to not waste conda-forge's ci time, but actually for azure time limitation is not a problem so theoretically we can move the weekly builds to conda-forge. For conda-forge it's also possible to keep all old build (no storage limitation). Currently for the freecad-organisation on anaconda.org we already store more than 3 GB (which is the official limit). I think the inofficial limit is 10gb.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Reducing the size of AppImage

Post by Kunda1 »

looo wrote: Sat Sep 28, 2019 8:48 pm Yes I am fine with outsourcing ship and plot finally. I will try take care of the external workbenches, so both work with latest FreeCAD. I had plans to optimize the plot module, but time is rare.
Awesome. I wonder if this will speed up compile time at all ? (probably not because they're both python based WBs....right?)
Also, I wonder if this will make the AppImage 'weigh' less ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Reducing the size of AppImage

Post by sgrogan »

Kunda1 wrote: Sat Sep 28, 2019 8:52 pm Also, I wonder if this will make the AppImage 'weigh' less ?
This will be minor, but worthwhile anyway.
looo wrote: Sat Sep 28, 2019 8:48 pm Yes I am fine with outsourcing ship and plot finally. I will try take care of the external workbenches, so both work with latest FreeCAD. I had plans to optimize the plot module, but time is rare.
No worries. I will try to make a pull request tomorrow to make these not built by default. This will further break the PPA, but I will try to make a pull request for this as well.
looo wrote: Sat Sep 28, 2019 8:48 pm And sorry for my mess. I will try to clean the FreeCAD-conda repo a bit. Just for your information:
conda-forge/freecad-feedstock -> official releases
looooo/freecad-feedstock -> weekly builds
Thanks for the info. :)
"fight the good fight"
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Reducing the size of AppImage

Post by triplus »

In the next day or two i will add the suggested changes, need to test the recipes locally first. I noticed PyQt was added to FreeCAD 0.18 AppImage and that will get removed too. It isn't there anymore in FreeCAD 0.19 AppImage. As for further reducing the size. We likely don't need the whole VTK library, as i guess only a small subset is being used, for FreeCAD FEM purposes. Maybe we could figure out on what parts of the VTK could be removed. Other libraries, like some Python oriented ones, there we can't remove all that much, as developers will use them in different ways. We can't provide just the parts FreeCAD uses by default. Whenever we will embed the documentation, the documentation itself likely should be reduced a bit somehow.

Beyond doing all that i guess not much else we can't do about the AppImage size. That is if we don't want to start removing functionality.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Reducing the size of AppImage

Post by triplus »

OK, this is it:

FreeCAD 18 (embedded documentation):
  • Before: 537M
  • After: 521M

FreeCAD 19:
  • Before: 435MB
  • After: 373MB
FreeCAD 0.18 had PyQt and FreeCAD 0.19 had some Clang/LLVM libraries included. That likely isn't needed and i removed them, as some other stuff, like documentation, cmake and header files ... For removing more, that would come at the expanse of removing functionality. AppImages are now rather featureful. From all sorts of standard Python libraries, like NumPy, SciPy and there is Calculix, SolveSpace, OpenBLAS ... FreeeCAD, by default, doesn't use all of this, but if we remove parts of it, that likely will cause issues with external modules. I could reduce the size of VTK. I started the task, removing Python bindings and some other libraries, that would reduce the size (uncompressed) by lets say around 100MB. But that is still rather small gain, compared to the whole size, around 1.5GB. In addition you wouldn't be able to do this:

Code: Select all

import vtk 
VTK is one of the contenders, for possible future viewport purposes, therefore best to leave it as is, for now. Embedded documentation. Here things have some potential to improve. But that is out of scope and something that can get considered when creating FreeCAD 0.19 (offline) documentation.
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Reducing the size of AppImage

Post by Kunda1 »

Was looking at the SVGs in the FreeCAD source tree. I decided to do a search looking for all SVGs over +10k:

Code: Select all

find . -iname "*.svg" -size +10k -exec du -h {} \; | wc -l
Found 837
I wonder if we can optimize these SVG somehow subsequently further reducing the size of the AppImage ?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Reducing the size of AppImage

Post by triplus »

If we would optimize all SVG files (upstream), we are talking about up to 2MB in size. Such efforts can be pursued by others, if desired. I personally don't see a point.
Post Reply