perf(export): batch message count retrieval for large session lists

This commit is contained in:
tisonhuang
2026-03-01 18:02:51 +08:00
parent a8eb0057e3
commit 5147b3f0e4
6 changed files with 81 additions and 12 deletions

View File

@@ -624,6 +624,10 @@ function ExportPage() {
const count = prev[session.username]
if (typeof count === 'number') {
next[session.username] = count
continue
}
if (typeof session.messageCountHint === 'number' && Number.isFinite(session.messageCountHint) && session.messageCountHint >= 0) {
next[session.username] = Math.floor(session.messageCountHint)
}
}
return next