jlplenio / crude-twitch-viewer-bot

Send live viewers to Twitch, youtube and kick with this viewer bot software. The tool offers a user-friendly graphical interface. This program requires HTTP proxies.
GNU Affero General Public License v3.0
329 stars 91 forks source link

Release .exe is faster than unpacked code. #121

Closed AngelMarchena closed 1 year ago

AngelMarchena commented 1 year ago

Desktop (please complete the following information):

Describe the bug A clear and concise description of what the bug is. If the code is executed in IDE (Visual Studio Code, IDLE) it suffers significant performance issues. The released .exe is drastically faster. Can we get documentation on how the .exe is compiled to get that performance improvement?

Screenshots If applicable, add screenshots to help explain your problem.

logs If applicable, post the part of the ctvbot.log, that refers to the problem.

jlplenio commented 1 year ago

That is quite the unique behavior. Maybe the IDE hooks into the program and slows it down? I never had slowdowns in the IDE, mine is PyCharm Pro. Have you tried running the main_guy.py directly without the IDE?

The executable is built via pyinstaller, see https://github.com/jlplenio/crude-twitch-viewer-bot/blob/45c0de9650855f66ed5e623b3b918ca8a360c5fa/.github/workflows/build_release.yml#L47

AngelMarchena commented 1 year ago

Thank you so much for your response! I will give both PyCharmPro and test and try the pyinstaller. I did notice the same speed issue with running just the main_guy.py.

jlplenio commented 1 year ago

Quite strange. Maybe try running a different Python version? If you use poetry and my lock file, you can recreate my dev environment exactly and the environment that is baked into the exe.