I've automated a deployment, and used 7-zip to compress a directory as part of the automation. Whenever 7-zip comes to compress the directory, however, it seems to take a long time (over 60 seconds) at the start when it just says "Scanning" ... it doesn't seem to be adding files to the archive at this time. Also, its not using significant CPU time.
It's not a big directory; maybe 8 MB, and not an overly large number of files - less than 300.
What's it doing? Should I be concerned? Can I speed it up?
It's looking through the data for optimal patterns to "tokenize" for the best compression. It probably loaded up as much data as possible into RAM for quicker access and reduced IO.
Since 7-zip supports multiple compression algorithms, you might try some of the other ones to see if there is a particular one that suits your needs of compression speed versus efficiency.