I followed code and it looks like data processing is very time consuming. is there a better approach for that?