Database access optimisation: Add a gene to a panel
Description:
Adding a gene to a panel creates many queries? Total ~116
SQL queries hitting to database.
/panels/{id}/gene/add
POST ~56 queries
GET ~60 queries
Version tested: 3.1.1
Steps to reproduce locally:
- DEBUG flag on
- Debug Toolbar on
- Add a gene to a panel with existing entities of 1600++ (e.g. download and import this panel https://panelapp.agha.umccr.org/panels/250/)
- Monitor console logs and Debug Toolbar profiling on SQL queries.
Note that, since the page will be redirected, the Debug Toolbar will show GET request query count. Therefore, do check console log for POST request query count.
Issues:
- Affecting performance and slow responsiveness
- Not ideal database access operation
Edited by Victor San Kho Lin