Optimize note list memory: reduce batch to 40, add lazy loading and throttle PDF rendering

This commit is contained in:
chrisf committed 2026-10-24 22:25:04 -06:00
1 parent 3bd9eacbe3
commit ad640397e6
4 files changed
+68 -8

No files matched your search

+1 -1
View File
@@ -27,7 +27,7 @@ export async function GET(req: NextRequest) {
const shortcut = sp.get('shortcut') === 'true';
const sortBy = sp.get('sortBy') || 'updatedAt';
const sortDir = (sp.get('sortDir') === 'asc' ? 'asc' : 'desc') as 'asc' | 'desc';
const limit = Math.min(parseInt(sp.get('limit') || '500', 10) || 500, 2000);
const limit = Math.min(parseInt(sp.get('limit') || '50', 10) || 50, 150);
const offset = parseInt(sp.get('offset') || '0', 10) || 0;
const where = buildNoteWhereClause({