I'm gradually dipping back in the RBAC feature project and I had the opportunity of being slowed down to a crawl when using the django debug toolbar.
After a bit of troubleshooting and resolution, turned out it was mainly a query optimisation issue.
Here are the changes and their results, they shouldn't change any feature just make stuff faster, did a tiny bit of refactoring but should be minor.
As far as results are concerned:
/manage: Before 915 queries with the current production database, down to 202 queries (couldn't easily optimise absences and contribution types without changing the schema)
/event-browser: Before a whopping 6183 queries with the current production database, down to 6 queries :smile:
Hello,
I'm gradually dipping back in the RBAC feature project and I had the opportunity of being slowed down to a crawl when using the django debug toolbar.
After a bit of troubleshooting and resolution, turned out it was mainly a query optimisation issue.
Here are the changes and their results, they shouldn't change any feature just make stuff faster, did a tiny bit of refactoring but should be minor.
As far as results are concerned:
/manage
: Before 915 queries with the current production database, down to 202 queries (couldn't easily optimise absences and contribution types without changing the schema)/event-browser
: Before a whopping 6183 queries with the current production database, down to 6 queries :smile: