improvement for shared-repo sort