What is the best way to handle this lengthy calculating process?