I'm trying Python for the first time and am having a slowness issue. I wrote the program using Python 3.7 on Windows 10 64-bit. The program reads a 2.5GB text file on a server and splits it into 3 separate files on the local hard drive. It splits the file line by line based on the first character of each line.
On my Windows 10 machine it takes 25 minutes to complete, which I thought was long but it is a very large file.
I used pyinstaller to create an .exe file so users can run the program without installing Python (although I don't think this is part of the problem as it takes 25 minutes just running the .py from VS2017).
Two different users on Windows 7 machines can run the program in under 5 minutes, which is a vast difference from the 25 minutes on my Windows 10 box (and now verified on a 2nd Win10 box). I've done extensive searching online but haven't found anything that helps me determine the cause yet. Some people say to exclude Python directories from Windows Defender scans but my Defender is turned off (we use McAfee).
Could someone maybe point me in the right direction to look why it is taking so much longer on Windows 10? I'm happy to post the code but I do not think it is a coding issue as it still works perfectly on both OS. I've been developing professionally for ~15 years now in a multitude of languages but never had a discrepancy this big.
EDIT:
- I have tested on two Win7 machines and two Win10 machines now. Both Win7's run the program in 5 minutes. Both Win10 machines run the program in 25 minutes.
- The Win7 PC has an Intel i5-3470 CPU @ 3.20GHz with 8GB RAM
- My Win10 PC has an Intel i7-6700 CPU @ 3.40GHz with 16GB RAM
- I can't check Win7 PC at this time, but my Win10 HD is Solid State Drive Non-Encrypted 256 GB FLASH - NAND (TLC) 120 TBW SATA-3.2 6 Gb/s 2.5 Inch
- I have run the same exe on both machines but it takes 5x longer on Win10
- We are both on the same network and I ran AT&T's online network speed test. The Win7 and Win10 machines both registered ~100MB down.
- I also turned the Win10 to High Performance power option and no improvement.
- The Python code is not multithreaded as I'm only iterating through one file once.
Thanks.