Improving efficiency of contour line app