I'm using PyInstaller to create a single executable of a python program using PyQt. It creates the .exe and runs fine, but takes between 15 to 20 seconds to start. I thought I could get by with creating a splash screen so the user would at least know something was happening, unfortunately, the splash screen doesn't show up any quicker than the program window itself. I also created the same program as -onedir, the program does start quicker, but this isn't really an option for distribution. If anyone has any ideas on what is slowing down the execution and ways to speed things up I would certainly appreciate it. Thanks.
Asked
Active
Viewed 1.1k times
16
-
1Exactly my problem at this time! – Eduardo Mar 18 '16 at 13:15
1 Answers
10
Please look at this info provided with Pyinstaller wiki, http://www.pyinstaller.org/export/latest/tags/1.5/doc/Manual.html?format=raw#how-one-file-mode-works
according to this, When first started, it(one file exe) finds that it needs to extract these files before it can run "for real". . This creation of temporary folder under user's temp directory and extraction of content took initial time.

Gagandeep Singh
- 5,755
- 4
- 41
- 60
-
Thanks for finding that for me. I guess that means there's nothing I can do but try to reduce my footprint as much as possible. – Stephen Jun 06 '11 at 21:50
-
2There is one thing you can do. Instead of creating onefile with pyinstaller you can create directory and use any one of [these](http://www.installsite.org/pages/en/msi/authoring.htm) installer creation software for making installer for distribution.InstallShield is best known brand for installer creation. I can assure you that reducing footprint don't help you much. since, Pyinstaller adds many dlls and libraries, that your program depends upon and it might be possible that your footprint is already very small as compare to these extra files. – Gagandeep Singh Jun 07 '11 at 10:05
-
3I'll notice that sometimes virus scanners slow down PyInstaller bootstrap, because they want to check that all those dll files are not viruses. There's no general way around it though if you go for onefile mode. – Giovanni Bajo Dec 11 '11 at 14:44
-
an splash image would be a nice addition to the pyinstaller https://stackoverflow.com/questions/48315785/pyinstaller-adding-splash-screen-or-visual-feedback-during-file-extraction – toto_tico Apr 13 '18 at 16:01