I wouldn't expect this part to be especially slow, it's just iterating through files and munging them.  However, I suppose with a large amount of files anything will be slow.  Is there a reasonable alternative?