I've created a basic program using Kivy. I've noticed that after creating the executable with PyInstaller the CPU usage skyrockets from the 0.0% (in case I run it from the console as .py file) to like 30% when run as an executable.
from kivy.app import Appfrom kivy.uix.label import Label
class TestApp(App):
def build(self):
return Label(text="Hello")
if __name__ == '__main__':
test = TestApp().run()
# -*- mode: python ; coding: utf-8 -*-
block_cipher = None
a = Analysis(['s:\\!kyxa\\!code\\kivy\\MinimumApp\\minimum_kivy.py'],
pathex=['s:\\!kyxa\\!code\\kivy\\MinimumApp'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='minimum',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='minimum')
Presumably the higher cpu usage is transitory.
You can test this by creating an install that is not a single file ;)