fix by Felix Kurth <[email protected]> to address slow page loads with >70k users
Quoting Felix:
Dear Mr Tal,
Our company uses its Daloradius software with about 70,000 users. Because a lot of very slow sql queries we have made some adjustments to increase the performance. We would be very happy if you would install this in future versions.
The changes apply to both the queries for counting and for the output of the data are responsible.
This PR addresses the issue by applying the patches he sent me.
btw @MiguelVis, do you want to review the changes here? I couldn't test it locally, but if you have a setup ready then this PR seems like a promising performance fix.
@lirantal
Ok, I will look at this asap.
@filippolauria do you maybe want to try this PR out? It seems to be a really big performance improvement fix but it needs a bit of testing so maybe you can confirm this works ok and then land the changes?
Agree. Feel free to merge the commit!
This has been addressed in other PRs.