Modifying thousands of files is very slow.
In our opinion this requires a rewrite in C/C++ of the core of the tool in order to use native OS APIs directly and also a lot of parallel threads, also changing the way to modify files (writing all in a new file then delete the initial file put a lot of pressure on the storage for no reason).