History Tab code update for faster screen refresh using RAM sort vs DB sort