I noticed that fossil prefers using over /tmp for temporary
storage, in file.c and sqlite3.c.  This strikes me as strange: why
would fossil (and sqlite3 in general) want its temporary storage to
persist across reboots?

Setting TMPDIR=/tmp made `fossil annotate' run tremendously faster for
me, since my /tmp is a RAM-backed file system while my is a
synchronous disk-backed file system on this machine -- the total time
reduced from an hour to two and a half minutes.  Two and a half minutes
is still pretty slow, though.

While looking at this, I noticed that file_tempname in file.c does not
appear to respect the TMPDIR environment variable at all.  Fortunately,
this routine appears to be used only by `fossil diff' and only when an
external diff program is configured.