Something in the changes in FileSpec::Equal and more particularly FileSpec::GetNormalizedPath over the past 3 or 4 months have made the file comparisons that happen when we're matching file & line breakpoints against loaded libraries much slower. I have reports of setting 50 breakpoints on a fairly complex program with ~10000 source files now takes many minutes, and the sample shows almost all the time spent in GetNormalizedFile.
I still have to figure out what got slow here, but in the near term, the FileSpec::Equals algorithm was computing the normalized path in many cases where it didn't need to. The only way two FileSpecs can be equal if their filenames are not equal is if one or the other filename is "." or "..".
This patch takes advantage of that observation to short cut all compares with unequal filenames that aren't "." or "..". Since almost all file compares done when setting breakpoints are for unequal filenames, this should reduce the time spent setting breakpoint.
Add a return of false here and avoid the whole "last_component_is_dot" stuff below?