0

I made an app with Python 3.7 and PyQt5 which works fine on Windows 10 without problem and launches rapidly (<1 sec) when launched it from the text editor. I then converted it with PyInstaller in a standalone app. It works also fine but takes around 25 sec (!) to launch. What the app itself does is:

  • it takes a txt file where values with there labels are stored
  • it converts the txt file into a csv file (6 columns 128 rows)
  • it opens the csv file
  • It converts the info of the csv into a panda
  • it then evaluates certain values with and construct a report according to the values (ex: if the value of parameter 1 is 50, the corresponding generated text will be "the parameter is high")

As the application is meant to be deployed on computer which don't have python installed and in a workplace environment where this task has to be done many times a day, I imagine the user lambda cursing at the app developer because the app takes 23 seconds to launch

  • Is there a way to optimize that time, or is the price to pay for a standalone app written in a interpreted language like python
  • Should I forget getting some speed from that solution and re-write the app in C++ . If yes the problem is that I don't know anything about C++ ==> are there some automatic translators?

Many thanks in advance for your insight

ecjb
  • 5,169
  • 12
  • 43
  • 79
  • Are you using `--onefile` instead of the default `--onedir`, by any chance? That requires some of your program's dependencies to be unpacked into a temporary directory every single time it is run, which is the only reason I can think of why it would take so long to launch. – jasonharper Mar 04 '19 at 21:09
  • thank you for your answer @jasonharper. So what I actually did is that I first `cd` the directory where the app is residing and then ran `PyInstaller app.py`. I didn't add whether `--onefile` nor `--onedir`. What do you think I should do? – ecjb Mar 04 '19 at 21:38

0 Answers0