Coming from here
[Performance] Improve SidebarLinks:
Problem
Now all the Records to show on LHN are being calculated multiple times and the logic to fill it is complex, this one is a bit trickier to solve but I think it worth it
Solution
Summary
getOrderedReportIDs is a complex function that would be good to re-architecture.
Applying just caching like I did, isn’t the full solution, it gives me a good number to know if worth taking the time to improve it, and even if we aim to get ~40% to ~50% of improvement will be awesome