Before optimization
data retrieval for all five sub nodes ( (1) complex note (2) application log (3) user status (4) document history (5) attachment ) are done by Indian colleagues within the loop, which has quite poor performance – as complained by Marcin, it totally costs 71 seconds to finish task initial load. After optimization I have rewritten data retrieval for all five sub nodes and the optimized version only took around 17 seconds now in GM6 using user FF2_BUPA_AHN.
Before optimization, method GET_EXPANDED_ENTITYSET_ORIGIN has totally 253 lines of code,
Now only 70 lines of code, much easier to understand and maintain.