Issue 45402: experiment-showMaterial.view fetches Runs too often

Status:closed
Assigned To:Guest
Type:Defect
Area:Experiment
Priority:3
Milestone:22.07
Opened:2022-05-03 14:51 by jeckels
Changed:2022-06-02 14:11 by jeckels
Resolved:2022-05-04 10:29 by jeckels
Resolution:Fixed
Related:45344
Support Ticket: 
Pull Requests:platform#3318
Closed:2022-06-02 14:11 by jeckels
Related Issues
2022-05-03 14:51 jeckels
Title»experiment-showMaterial.view fetches Runs too often
Assigned To»jeckels
Type»Defect
Area»Experiment
Priority»3
Milestone»22.07
Related»45344
In the related issue I sped up this page rendering ~15-20x for materials with complex lineages. It's still doing more queries against the exp.experimentrun table than needed with this callstack:

at org.labkey.api.data.dialect.StatementWrapper.afterExecute(StatementWrapper.java:2820)
at org.labkey.api.data.dialect.StatementWrapper.executeQuery(StatementWrapper.java:1256)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.executeQuery(SqlExecutingSelector.java:504)
at org.labkey.api.data.SqlExecutingSelector$ExecutingResultSetFactory.handleResultSet(SqlExecutingSelector.java:406)
at org.labkey.api.data.BaseSelector.getArrayList(BaseSelector.java:108)
at org.labkey.api.data.BaseSelector.getArrayList(BaseSelector.java:103)
at org.labkey.experiment.api.ExperimentServiceImpl.getRunsForRunIds(ExperimentServiceImpl.java:5398)
at org.labkey.experiment.api.ExperimentServiceImpl.getRunsForMaterialList(ExperimentServiceImpl.java:5382)
at org.labkey.experiment.api.ExperimentServiceImpl.getRunsUsingMaterials(ExperimentServiceImpl.java:5251)
at org.labkey.experiment.api.ExperimentServiceImpl.getRunsUsingMaterials(ExperimentServiceImpl.java:5240)
at org.labkey.experiment.controllers.exp.ExperimentController$ShowMaterialAction.getView(ExperimentController.java:899)
at org.labkey.experiment.controllers.exp.ExperimentController$ShowMaterialAction.getView(ExperimentController.java:882)

We can further improve it by querying in bulk.

2022-05-03 15:53 jeckels
Pull Requests»https://github.com/LabKey/platform/pull/3318

2022-05-04 10:29 jeckels
resolve as Fixed
Statusopen»resolved
Fixed in develop. Will be part of 22.6.

2022-06-02 14:11 jeckels
close
Statusresolved»closed
Assigned Tojeckels»Guest
Identical results with only 4 calls to get the run instead of 181 calls.