Solve performance issue