ipython/ipython — pull request #2959 by takluyver (2013-02-20 23:32:29+00:00)
Title: Add command to trim the history database.

With this, `ipython history trim` will cut the history database back to the last 1000 entries, with an optional backup (`--backup`).

I wrote this while investigating startup performance. I *think* trimming the history gives a small improvement, probably <10%, in cold start time, but there's quite a lot of noise in the timings.