Background flushing of old transactions for improved UI performance