Deal with large input data