don't call sort for every add in daemon/history Upstream-commit: b561f0398a28b3c648310eb8349b1f65c2fb28d5 Component: engine