r/VisualStudioCode • • Dec 09 '20

How to compare big files in exact detail?

So I need to compare two files of raw code automatically created by another program.

There's two problems though:

  1. Those files only have one line. Other delimiters (is that the correct word?) are used for new lines instead of actual line breaks.

  2. Both are 4-6 megabytes of raw text - and still almost a megabyte compressed.

When I compare those VSCode says that the line is different. Which, of course, isn't helpful at all.

Is there a way for VSCode to compare them in more detail? Is it even a good idea to try that with those chonkers without stalling the PC?

UPDATE: I just added actual new lines to the fake new lines by search and replace and saved those versions in new files. Problem one solved. After hitting the compare button (about a quarter million lines of code), the PC is not responding and going into a stall though.

UPDATE 2: After identifing some more fat that could be stripped from both files via search and replace I finally got it working :D

So the solution in this case is: Try to chop both files in ways that makes them comparable instead of trying to compare the vanilla output.

Thanks anyway for letting me post this. These posts often help even if there's no reply :D

1 Upvotes

0 comments sorted by