erp5_discussion: speed up retrieval of discussion posts from a web section
WebSection.getDocumentValueList() returns absolutely all the documents (as catalog brains) reachable by the web section. Then, calling .getUid() on them load all the objects in memory. The number of documents is of the order of hundreds, even on a small ERP5 (web pages, web scripts, etc.). Limit the documents to retrieve in WebSection_getLatestDiscussionPostList by filtering on the portal_type, and do not load them needlessly in memory.
Showing
Please register or sign in to comment