This is my first stackoverflow question. Hopefully, I can phrase it correctly, it does not appear to be a simply problem.
Basically I packaged a PyQt 5.7 program with pyinstaller, created a setup file with with Inno Setup, and installed the resulting program on my machine. The program functions correctly but my implementation of QTableView is very slow, while it is performed fine when using the pyinstaller exe.
A little more detail...
I am developing a numerical analysis application with PyQt 5.7. I have a QTableView that displays a list of dictionaries. Each dictionary is displayed as a column. There only 13 dictionary key value pairs for each column. The dictionary values are a mixture of strings and floats. I can easily add and remove columns by adding and removing dictionaries to the list and resetting the QAbstractTableModel the model. This works flawlessly and instantaneously while running the python script on my computer.
I packaged the application with pyinstaller into a folder by running the command "pyinstaller myscript.py". This creates a folder containing about 500mb of files (I am using numpy, scipy, pandas, and matplotlib) and a 20mb .exe file. Again the tableview works flawlessly and column can be added and removed instantaneously.
I then packaged the application with Inno Setup into an installer. I used the wizard to a create a .iss script as displayed below and created a setup .exe file.
After packaging and installing the application with Inno Setup it now it takes about 2 seconds to add or remove columns to the tableview. This will not be accepted by the end user as the tableview models a physical system that needs to be quickly edited for frequent analysis. Everything else in my application seems to work fine. The actual numerical calculation performs at the same speed.
My Python Interpreter is version 3.5.2, Anaconda 4.2.0 (64-bit). My machine is running Windows 10 64bit.
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{B79C4133-9CE4-4DBA-8898-EFC343E8D201}
AppName=PyMoor2
AppVersion=1.1
;AppVerName=PyMoor2 1.1
AppPublisher=My Company, Inc.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\PyMoor2
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Users\tarre\Desktop\PyMoor\main_window.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\tarre\Desktop\main_window\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\PyMoor2"; Filename: "{app}\main_window.exe"
Name: "{commondesktop}\PyMoor2"; Filename: "{app}\main_window.exe"; Tasks: desktopicon
[Run]
Filename: "{app}\main_window.exe"; Description: "{cm:LaunchProgram,PyMoor2}"; Flags: nowait postinstall skipifsilent
I have tried a variety of installation settings. To include "SolidCompression=No, Compression=zip, and forcing a 64bit installation with "ArchitecturesInstallIn64BitMode=x64 ia64" since my python interpreter is 64 bit and Inno setup defaults to 32 bit for some reason.
I am not sure what else to try. I have not tried other installers yet. Deploying a python application as a standalone application has been a very painful so far.
EDIT:
As pointed out by Martin the problem is not with Inno Setup. The behavior appears to be dependent on the application being located in the 'Program Files' directory.
The application works fine with the folder on the desktop, and directly in the C:/. The slowing behavior occurs when the program is in either of the Program File directories.