aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/wiki/revision.tmpl
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2025-03-20 10:46:18 -0700
committerGitHub <noreply@github.com>2025-03-20 10:46:18 -0700
commita4df01b5802c62863cdf26dc747e20617d847d89 (patch)
tree3d9d17ffc6040036589e37c879c6afcc74fbc0fa /templates/repo/wiki/revision.tmpl
parentef0970506f360977fbd74afe1952e246783da2b4 (diff)
downloadgitea-main.tar.gz
gitea-main.zip
Optimize total count of feed when loading activities in user dashboard. (#33841)HEADmain
Two SQLs are very slow when `action` table have over 5M records. ``` database duration=1.8881s db.sql="SELECT created_unix DIV 900 * 900 AS timestamp, count(user_id) as contributions FROM `action` WHERE user_id=? AND act_user_id=? AND (created_unix > ?) GROUP BY timestamp ORDER BY timestamp" database duration=1.5408s db.sql="SELECT count(*) FROM `action` WHERE (user_id = ?) AND (is_deleted = ?)" ``` This will cache the count for the first loading or when the activities changed.
Diffstat (limited to 'templates/repo/wiki/revision.tmpl')
0 files changed, 0 insertions, 0 deletions