3

I am working on a python script that pulls data from an Access database via ODBC, and pulls it into a sqllite database managed by django.

The script takes a fair while to run, and so I was investigating where the bottle necks are and noticed in Task Manager that when running the script python only has a relatively small CPU usage <5% (6 core 12 thread system) but "Antimalware Service Executable" and Windows explorer" jump from virtually nothing to 16% and 10% respectively.

I attempted to add exclusions to windows defender to the python directory, the source code directory, and the location of the Access DB file but this do not make any noticeable effect.

As a small amount of background, the script runs thousands of queries so IO will being accessed quite frequently.

Is there any troubleshooting I can do to diagnose why this is happening and/or if it affecting performance.

Hugoagogo
  • 1,598
  • 16
  • 34
  • 2
    Adding the exclusion folder to Defender is the way to go. If you still see spikes, this can mean that data is first downloaded to a temporary folder, which you have not added to the exclusion list. – Bram Vanroy Jul 24 '19 at 00:23
  • I don't believe any other folders are accessed, I do note that comparing profiling with Defender Enabled vs Disabled the key change is that the time spent in SQLiteCursorWrapper.execute goes from 635s to 351s – Hugoagogo Jul 24 '19 at 00:43
  • Also to be clear I don't see spikes but those cpu values for the duration of while the script runs. – Hugoagogo Jul 24 '19 at 00:45

0 Answers0