Improved log purging performance