very slow start

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

very slow start

maurice
Hello!

I'm using Pyinstaller to distribute a standalone application for co-workers (without having to install python plus everything else on their machine - guess that's how most people use it)
I succesfully create the .exe (although sometimes weird happens too) and it runs on someone else's machine but it takes too long to start. Almost one minute actually whereas on Spyder it takes 6s to the main screen pops up. Does anyone have an idea as to why this happens. I am using the console version so I can see that the code gets executed fine (once it starts getting executed) but the process before that is taking too long. Appreciate help, thx, sorry about the English.

Maurice

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: very slow start

Hartmut Goebel
Am 15.09.2016 um 20:57 schrieb maurice:
I succesfully create the .exe (although sometimes weird happens too) and it runs on someone else's machine but it takes too long to start.

If you are using --onefile mode, switch to --onedir mode, which does not require to unpack stuff on startup.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
http://www.goebel-consult.de

Blog: http://www.goebel-consult.de/blog/get-current-locale-with-ansible
Kolumne: http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.

smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: very slow start

maurice
So all this time is due to unpacking? Also sometimes it's much quicker (like 10s) and in some other cases it exceeds 1 minute.

On Friday, September 16, 2016 at 8:15:10 AM UTC-3, Hartmut Goebel wrote:
Am 15.09.2016 um 20:57 schrieb maurice:
I succesfully create the .exe (although sometimes weird happens too) and it runs on someone else's machine but it takes too long to start.

If you are using --onefile mode, switch to --onedir mode, which does not require to unpack stuff on startup.

--
Schönen Gruß
Hartmut Goebel
Dipl.-Informatiker (univ), CISSP, CSSLP, ISO 27001 Lead Implementer
Information Security Management, Security Governance, Secure Software Development

Goebel Consult, Landshut
<a style="color:black" href="http://www.goebel-consult.de" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHs4zUB0fQIL_Yg4brDiF83WXvPcg&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHs4zUB0fQIL_Yg4brDiF83WXvPcg&#39;;return true;">http://www.goebel-consult.de

Blog: <a style="color:grey!important;text-decoration:none!important" href="http://www.goebel-consult.de/blog/get-current-locale-with-ansible" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fget-current-locale-with-ansible\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFQxMO7q0gmkgOX72gy3b1LjOEKrA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.goebel-consult.de%2Fblog%2Fget-current-locale-with-ansible\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFQxMO7q0gmkgOX72gy3b1LjOEKrA&#39;;return true;">http://www.goebel-consult.de/blog/get-current-locale-with-ansible
Kolumne: <a style="color:grey!important;text-decoration:none!important" href="http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-08-scheingefechte-um-rim\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFF_b7FnIGBt1JQ0yTMiZIwSU7oiA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.cissp-gefluester.de%2F2010-08-scheingefechte-um-rim\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFF_b7FnIGBt1JQ0yTMiZIwSU7oiA&#39;;return true;">http://www.cissp-gefluester.de/2010-08-scheingefechte-um-rim

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: very slow start

Steve Barnes


On 19/09/2016 21:23, maurice wrote:
> So all this time is due to unpacking? Also sometimes it's much quicker
> (like 10s) and in some other cases it exceeds 1 minute.
>

If you have recently run the packed code, i.e. last few minutes, your OS
cashing may well go - you just deleted those files and need them back so
here you go. Also some anti-virus software can cause a huge variability
- the first time that you run it will scan the entire packed executable
before allowing it to run, scan the files it writes as it writes them
and in some cases scan them again as they are read but once it has done
so may just verify that it is the same unchanged file. Also any dynamic
load libraries are loaded into RAM at the first run and don't
necessarily remove themselves as soon as you exit so a second run
shortly after the first can be faster from that as well.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: very slow start

maurice
Oh ok. Sometimes it is quicker at the first run actually but it makes sense the antivirus be the problem. Guess my best bet is use --onedir and if I can, I'll let the dependencies elsewhere and not on dist folder.

On Tuesday, September 20, 2016 at 3:07:30 AM UTC-3, Steve Barnes wrote:


On 19/09/2016 21:23, maurice wrote:
> So all this time is due to unpacking? Also sometimes it's much quicker
> (like 10s) and in some other cases it exceeds 1 minute.
>

If you have recently run the packed code, i.e. last few minutes, your OS
cashing may well go - you just deleted those files and need them back so
here you go. Also some anti-virus software can cause a huge variability
- the first time that you run it will scan the entire packed executable
before allowing it to run, scan the files it writes as it writes them
and in some cases scan them again as they are read but once it has done
so may just verify that it is the same unchanged file. Also any dynamic
load libraries are loaded into RAM at the first run and don't
necessarily remove themselves as soon as you exit so a second run
shortly after the first can be faster from that as well.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: very slow start

maurice
In reply to this post by Steve Barnes
I think it's definitely the antivirus. There was a time, yesterday, that it was not active and all my distributes worked fine (both --onefile or --onedir). Today it's pretty bad and just checked the antivirus is on. It's IT guys who handle this so don't know what to do . However, I thought the --onedir version would not trigger the antivirus but it does anyway.

On Tuesday, September 20, 2016 at 3:07:30 AM UTC-3, Steve Barnes wrote:


On 19/09/2016 21:23, maurice wrote:
> So all this time is due to unpacking? Also sometimes it's much quicker
> (like 10s) and in some other cases it exceeds 1 minute.
>

If you have recently run the packed code, i.e. last few minutes, your OS
cashing may well go - you just deleted those files and need them back so
here you go. Also some anti-virus software can cause a huge variability
- the first time that you run it will scan the entire packed executable
before allowing it to run, scan the files it writes as it writes them
and in some cases scan them again as they are read but once it has done
so may just verify that it is the same unchanged file. Also any dynamic
load libraries are loaded into RAM at the first run and don't
necessarily remove themselves as soon as you exit so a second run
shortly after the first can be faster from that as well.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: very slow start

maurice
More on this:

yesterday all my pyinstaller apps were perfect, and I created them yesterday.
today those are not working but the version from more than one week ago is. Weird.

On Wednesday, September 21, 2016 at 2:06:20 PM UTC-3, maurice wrote:
I think it's definitely the antivirus. There was a time, yesterday, that it was not active and all my distributes worked fine (both --onefile or --onedir). Today it's pretty bad and just checked the antivirus is on. It's IT guys who handle this so don't know what to do . However, I thought the --onedir version would not trigger the antivirus but it does anyway.

On Tuesday, September 20, 2016 at 3:07:30 AM UTC-3, Steve Barnes wrote:


On 19/09/2016 21:23, maurice wrote:
> So all this time is due to unpacking? Also sometimes it's much quicker
> (like 10s) and in some other cases it exceeds 1 minute.
>

If you have recently run the packed code, i.e. last few minutes, your OS
cashing may well go - you just deleted those files and need them back so
here you go. Also some anti-virus software can cause a huge variability
- the first time that you run it will scan the entire packed executable
before allowing it to run, scan the files it writes as it writes them
and in some cases scan them again as they are read but once it has done
so may just verify that it is the same unchanged file. Also any dynamic
load libraries are loaded into RAM at the first run and don't
necessarily remove themselves as soon as you exit so a second run
shortly after the first can be faster from that as well.

--
Steve (Gadget) Barnes
Any opinions in this message are my personal opinions and do not reflect
those of my employer.

--
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 post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/pyinstaller.
For more options, visit https://groups.google.com/d/optout.
Loading...