FYI, there's a Calibre tweak setting for maximum resort levels. I doubt this will be noticeable to most people, but it is there.
ID: maximum_resort_levels
Set the maximum number of sort 'levels' that calibre will use to resort the
library after certain operations such as searches or device insertion. Each
sort level adds a performance penalty. If the database is large (thousands of
books) the penalty might be noticeable. If you are not concerned about multi-
level sorts, and if you are seeing a slowdown, reduce the value of this tweak.
Code:
# Set the maximum number of sort 'levels'
maximum_resort_levels = 5