Closed ndmitchell closed 8 years ago
Removing all duplicates would be one approach, just omitting adjacent duplicates is probably simpler, guarantees to lose less information, and gives most of the gains.
I'll probably refactor the whole thing to have a common frontend for windows/unix and implement it there. Probably as a flag, since I think clang behaves better.
What are the reasons you might want duplicate adjacent lines? Do they communicate real information?
If you're going for a flag, and it's easy, Shake really only wants each line once, removing all duplicates, adjacent or not - but certainly Shake can do that on it's side.
Now --
should emit with dups removed and ---
should emit the whole thing.
The raw output can be useful to debug fsatrace and to detect strange behaviour I guess.
Confirmed, that's a lot more manageable. Thanks.
Currently, running
gcc -c main.c
, I get 139 lines output fromfsatrace
. If I remove all lines which are identical to the previous line, I'm left with 15. Reducing the number of lines by a factor of 10 results in less storage, and less requirement for processing downstream. This will probably help with https://github.com/ndmitchell/shake/pull/334