Tag Archives: snippets

Vacuuming Firefox’s sqlite3 databases

Firefox 3 was running very slow for me, so I desperately tried this, thinking that it wouldn’t make much difference. I was wrong; there was a noticeable speed improvement. From a bash shell: find ~/.mozilla -iname ‘*.sqlite’ -execdir sqlite3 {} ‘vacuum;’ \;

object.Equals handles null values correctly

Here’s the source code, as disassembled by Reflector: public static bool Equals(object objA, object objB) { return ((objA == objB) || (((objA != null) && (objB != null)) && objA.Equals(objB))); } It seems that not even Microsoft knows this! I spotted this code, from ASP.NET’s MVC implementation, on Scott Hanselman’s blog: return (other != null) [...]