mirror of
https://github.com/wekan/wekan.git
synced 2026-11-26 20:45:07 -05:00
The report already paginates server-side (25 rows per page via limit/skip), so it never loaded all cards into the browser, but two things made it feel like it did: 1. The cardsReport publication sent WHOLE card documents - description, customFields, vote/poker sub-documents, every date field - when the table renders only six columns. A 25-row page could be hundreds of kilobytes on boards with long descriptions. It now projects title, boardId, listId, swimlaneId, members and assignees only. 2. Every prev/next click re-ran the report's count method as well as re-subscribing. getCardsReportCount counts EVERY card in the database, and the total cannot change just because you moved to the next page, so each click paid for a full collection count plus a second server round trip. loadReport() now takes a `recount` flag: opening a report and searching in it recount, plain paging does not. Both changes apply to the other paginated admin reports too (files, rules, boards, impersonation, recovery), which share loadReport(). Thanks to xet7 !