PyInstaller creates slow executable

executablepyinstallerpyqt

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.

Best Solution

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.

Related Question