Large increase in CPU usage after being made into an executable from PyInstaller

62 views
Skip to first unread message

throwawa...@gmail.com

unread,
Feb 23, 2019, 6:44:42 PM2/23/19
to Kivy users support
Hi all,

I've created a basic program using Kivy and noticed that after creating the executable from PyInstaller the CPU usage skyrockets from the 0.0% it normally has when run as a .py file to like 25-30% when run as an executable.

Here are the .py and .spec files that I'm using:

test_window.py :
from kivy.app import App
from kivy.uix.label import Label

class TestApp(App):
   def build(self):
       return Label(text="Hello")        

if __name__ == '__main__':  
           
   test = TestApp().run()

test_window.spec
from kivy.deps import sdl2, glew

# -*- mode: python -*-

block_cipher = None


a = Analysis(['c:\\Users\\Test\\Desktop\\kivy test\\test_window.py'],
            pathex=['C:\\Users\\Test\\Desktop\\kivy test\\compile_here'],
            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='test_window',
         debug=False,
         bootloader_ignore_signals=False,
         strip=False,
         upx=True,
         console=True )
coll = COLLECT(exe, Tree('C:\\Users\\Test\\Desktop\\kivy test\\'),
              a.binaries,
              a.zipfiles,
              a.datas,
              *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
              strip=False,
              upx=True,
              name='test_window')

Is there any way to lower this or get a better idea of what is causing it to go so slowly? I tried searching this forum as well for other tips but couldn't find anything relevant.
Reply all
Reply to author
Forward
0 new messages