Skip to content

Commit ac7e2a2

Browse files
Ticket 54342: PanoramaWeb overwhelmed with requests for massive targetedms-groupChromatogramChart.view plots (#1155)
1 parent d88737a commit ac7e2a2

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/org/labkey/targetedms/chart/ChromatogramDataset.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,7 @@ protected String getSeriesLabel()
14621462

14631463
public static class GroupDataset extends RtRangeDataset
14641464
{
1465+
private static final int SERIES_LIMIT = 25;
14651466
private final PeptideGroup _group;
14661467
private final SampleFile _sampleFile;
14671468
private final ViewContext _context;
@@ -1570,6 +1571,12 @@ protected List<PrecursorChromInfoPlus> getPrecursorChromInfos()
15701571
}
15711572
}
15721573

1574+
// Ticket 54342: PanoramaWeb overwhelmed with requests for massive targetedms-groupChromatogramChart.view plots
1575+
if (_allMolecules.size() > SERIES_LIMIT)
1576+
{
1577+
_allMolecules = _allMolecules.entrySet().stream().limit(SERIES_LIMIT).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue, (e1, e2) -> e1, LinkedHashMap::new));
1578+
}
1579+
15731580
List<PrecursorChromInfoPlus> nonOptimizationPeaks = new ArrayList<>();
15741581
for(List<PrecursorChromInfoPlus> infos : _allMolecules.values())
15751582
{

0 commit comments

Comments
 (0)