Of course, all this only affects standalone scripts from "pp -P", not binaries with fast C code SHA1. If you assume that there is a local Perl installation being used to run the standalone script, it might be reasonable to assume that the Perl installation has Digest::SHA1 and go with the first changes to par.pl and Par.pm that I did. As noted in the SpamAssassin code, Digest::SHA1 is a lot faster than the pure Perl code. It's your choice...
Thanks so much. However, I benchmarked a bit on my P4M machine, and a typical 1.2mb file actually takes >10 seconds to finish SHA1. Since it is conceivable that Tk application can grow well beyond this size, I'm afraid that unless we find a faster pure-perl SHA1 implementation, I'll stick with your earlier patch that falls back to mtime.
P.S.
If you "set PAR_CLEAN=1" and then run:
pp -o tt.exe t.pl
the temp dir from the pp run is deleted, but if you run:
pp -P -o tt.pl t.pl
a temp dir from the pp run is empty, but still there and is a "temp-$pid" type. I haven't looked for the cause of this.
Well, it's because the rmdir() call failed since there are still unfree DLLs in the temp directory, which automatically gets unlinked after the program ends. I see no easy way around this, though. :-/
Thanks, /Autrijus/
