After cursors have already generated their desired functions, they are still waiting for generating, which is a bad practice and not optimal. Head-on solution: prevent cursors from generating after calling their generated function and add a cache