Slow performance interface

Team,

I have a below code which is mix of rules and query. Code quires DB to get data on a quarterly basis which is around 50k every quarter then compares them with rule data and show count.

Interface is very slow to load and also takes lot of time to show second drop down when first one selected. Can you guys suggest some improvements  to improve the performance .

  Discussion posts and replies are publicly visible