improve data preprocessing speed