Three Monkeys, Three Typewriters, Two Days

August 11, 2009

Whitespace-ignoring diffs with Mercurial

Mercurial's -w switch to diff is more or less broken. If you're on a platform which has a sane diff program, you can use the following in your hgrc instead:

[extensions]
hgext.extdiff =

[extdiff]
cmd.wdiff = diff
opts.wdiff = -p -U 8 -w -r -N

Then use hg wdiff the same way you'd have used hg diff.

Posted by bzbarsky at 3:49 PM

August 3, 2009

Shark performance

Yes, I mean performance of Shark itself. It's been annoying me no end that Shark is so slow to actually produce the profile, with lots of time spent by pilotfish (presumably gathering symbols). I've experimented with this some, but running dsymutil and then stripping didn't seem to help much.

Eventually, I discovered that simply running strip -S on my XUL library (in an --enable-libxul build, of course) made Shark produce the profile quickly. I can't get source code display, but I _can_ get the various callstack information, which is what I usually want. And getting the results in seconds instead of minutes is absolutely worth it.

Posted by bzbarsky at 11:03 AM