[FIX] read: fix performance issue due to O(n)^2 sorting