Improve performance of merging tickets.