I generally agree with that, but in some cases it can make sense (like in your case) when you know what your’re doing.
File permission changes:
Well yeah, if you edit files with a sudo’ed program within your home folder this will screw up file permissions. I guess that concern comes from the scenarios where users just blindly sudo everything (“hey I heared about about that sudo which makes you the master. I just prepend all commands with it…”).
However your intention is clearly to make file changes that are owned by root.
Millions of lines of code run with elevated privileges:
Well, that’s true. However as long as your system and network are not already compromised and someone is waiting for you to run GUI as root I don’t see too much of an issue.
Text based programs can also make use of tons of foreign libraries, running millions of lines of code.
So. On a well secured system I don’t think running meld with root permissions (for the purpose of changing root owned files) for 5 minutes is a big issue here.
The alternative is to make your diff analysis via meld and then use a text based editor (with root permissions) to make the desired changes…