Currently snapcraft tries to bytecompile some of the files during build (which is insufficient, because the whole dependency tree needs to be bytecompiled for things to be actually fast), this pollutes the snap and increases the size (depending on the size of the project). For
crossbar snap we bytecompile the whole prime directory, which balloons the output size by 33% at least. With Python3.8 that could be avoided all together, which allows for custom location of pycache https://bugs.python.org/issue33499
I wanted to know and (potentially trigger the conversation) if there are plans to achieve something in the future i.e. bytecompile python files Post install and save the output to a writable location.
Also if there are workaround(s) today that I could use to reduce the size of the snap, that would be of great help
NOTE: bytecompile of the whole prime tree was important in our case because the software is also supposed to run on a RaspberryPi and on that environment, without bytecompile(ing) the complete tree, the startup time was 30+ seconds.