From f8513ec2b11f5bc674118bb6ee61c18f56e0a656 Mon Sep 17 00:00:00 2001 From: mbergen Date: Mon, 16 Dec 2024 10:28:19 +0100 Subject: [PATCH] feat(statistics): improve game stats performance (#5192) * fix(statistics) Directly query match2game table * Fix comment --- components/statistics/count.lua | 2 +- components/statistics/portal_statistics.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/statistics/count.lua b/components/statistics/count.lua index 95fd76fae0a..c17787c7793 100644 --- a/components/statistics/count.lua +++ b/components/statistics/count.lua @@ -37,7 +37,7 @@ function Count.match2(args) end ----Counts the number of matches played on a wiki - querying lpdb_match2 +---Counts the number of matches played on a wiki - querying lpdb_match2game ---@param args table? ---@return integer function Count.match2game(args) diff --git a/components/statistics/portal_statistics.lua b/components/statistics/portal_statistics.lua index 70e5a786fa3..1fd866c3a29 100644 --- a/components/statistics/portal_statistics.lua +++ b/components/statistics/portal_statistics.lua @@ -251,7 +251,7 @@ function StatisticsPortal._coverageMatchTableRow(args, parameters) local gameCountValue if Info.config.match2.status == 2 then - matchCountValue = Count.match2gamesData(parameters) + matchCountValue = Count.match2game(parameters) gameCountValue = Count.match2(parameters) else matchCountValue = Count.matches(parameters)