core: performance update

This commit is contained in:
undefined committed 2024-10-25 06:29:40 +08:00
1 parent 87a3244f01
commit 751288e0fb
3 files changed
+29 -5

No files matched your search

+2 -1
View File
@@ -149,7 +149,8 @@ export class ProblemMainHandler extends Handler {
let [pdocs, ppcount, pcount] = this.queryContext.fail
? [[], 0, 0]
: await this.paginate(
problem.getMulti(domainId, query, quick ? ['title', 'pid', 'domainId', 'docId'] : undefined).sort({ sort: 1, docId: 1 }),
problem.getMulti(domainId, query, quick ? ['title', 'pid', 'domainId', 'docId'] : undefined)
.sort({ sort: 1, docId: 1 }).hint('sort'),
sort.length ? 1 : page, limit,
);
if (total) {