pooler / electrum-ltc

Electrum-LTC Litecoin wallet
https://electrum-ltc.org
MIT License
200 stars 102 forks source link

.appimage is slow to start — include .pyc into the bundle #327

Open ValdikSS opened 2 months ago

ValdikSS commented 2 months ago

AppImage (Linux) version of electrum-ltc is rather slow to start, it takes about 3 seconds on my modern Intel 1340P machine. This is because Python bytecode (.pyc files) are not included into .appimage, and since appimage could not be updated, Python compiles them every run.

If .appimage is exctracted with ./electrum-ltc-4.2.2.1-x86_64.AppImage --appimage-extract and ran from the directory (so it could update itself), subsequent runs are vastly faster.

$ time ./AppRun daemon --help
…
real    0m1,230s
user    0m1,124s
sys     0m0,096s

$ time ./AppRun daemon --help
…
real    0m0,348s
user    0m0,306s
sys     0m0,040s

Please run the application once in your building process, and include all the built .pyc files into .appimage.