Exe file with poor performance

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Exe file with poor performance

OldNerd
Hi all, this is my first post to this mailing list. Please excuse me if I'm doing something wrong.

I need help with the following:

  • I have developed a Python script which runs OK on a Raspberry Pi A+
  • I have successfuly generated an exe file using pyinstaller scriptname.py --onefile
  • When I run the exe file it runs with a veeery poor performance. When I say veeery poor I means it can't be used
Not sure if I'm doing something wrong (probably I'm) or this is to be exepected (which I doubt)...

What can I try in order to solve this?

Additional information:
  • my goal is to distribute the compiled version instead of the source file in order to minimize/avoid piracy
  • my scrip makes use of pygame and espeak

Many thanks in advance for any hint!

Best

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/0dc912b3-d9f1-4828-8007-dafa676ad468n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Exe file with poor performance

bwoodsend

Well --onefile can slow things down a little because it needs to unpack itself but not by that much. Try switching temporarily to --onedir and see if/how much difference it makes. If it’s a big difference then I can think of two possibilities:

  • I/O speed is the bottleneck. Raspberry Pis use and SD card instead of a built in SSD I believe?
  • You have some antiviral software on your Pi which will insist on sniffing everything in a --onefile build every time it unpacks (which is every time it runs).

Number 2 seems unlikely for Linux but it’s very common on Windows and macOS.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/3f5997f1-5c6f-4cdc-a7a9-11a4b60a9f7en%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Exe file with poor performance

OldNerd

@bwoodsend many thanks for your reply. I've used the --ondedir approach and it shows improvements, not big difference but better than before. I'll stay with this option.

You are right about the Pi using SD and also about no antiviral software on my Pi. Anyway the performance problems I've experienced happen during execution and not at startup time.

Again many thanks for your inputs.
On Tuesday, April 27, 2021 at 4:47:19 AM UTC-3 bwoodsend wrote:

Well --onefile can slow things down a little because it needs to unpack itself but not by that much. Try switching temporarily to --onedir and see if/how much difference it makes. If it’s a big difference then I can think of two possibilities:

  • I/O speed is the bottleneck. Raspberry Pis use and SD card instead of a built in SSD I believe?
  • You have some antiviral software on your Pi which will insist on sniffing everything in a --onefile build every time it unpacks (which is every time it runs).

Number 2 seems unlikely for Linux but it’s very common on Windows and macOS.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/5edef83d-8f7c-4ab4-8900-e45d01894687n%40googlegroups.com.