This script is really slow due to heavy reading and writing of potentially tiny files. Most likely we are IO bound here which means we should get a good speed up by simply using threads / asyncio. We could probably replace the system call to grep as well to remove some fork/join costs for each file being checked.
This script is really slow due to heavy reading and writing of potentially tiny files. Most likely we are IO bound here which means we should get a good speed up by simply using threads / asyncio. We could probably replace the system call to
grep
as well to remove some fork/join costs for each file being checked.