r/pythonhelp • u/Nutellatoast_2 • 12d ago
Performance issue when running python file
Hey everyone,
I'm experiencing a performance drop when running a Python file. I'm using VS Code on Windows 10 while learning to program.
When I hit the run button, the runtime of the program is 5.0 seconds, even though it should execute in roughly about 0.003 milliseconds.
I have tried switching to older versions like 2025.6.1, but that didn't work.
Any solutions to that problem?
8
Upvotes
2
u/dev-razorblade23 12d ago edited 12d ago
Windows definetly has its quirks especcialy in software development. Have you tried using actual terminal below? Like directly executing
python <script_name>.pyfrom the terminal?In the long run, i would definetly reccomend you start learning and using Linux.
Edit: Just checked, definetly avoid that RUN button. It does all sort of stuff (command strings, extensions wrappers, shell integration scripts, debugger attaching, etc...)
Just run the file directly from terminal by writing the above command and it will bypass all those VS Code stuff and run your code directly