stable
Clone or download
fix: request #27900 Document search can lead to an allowed memory size error
When there are a lot of documents stored in the Document service of a given project, and in addition if there is a lot of metadata stored per documents, the search can leads to a PHP allowed memory size error. Technical information --------------------- From a technical point of view, we have to change how we retrieve the documents in the search. As of today, we retrieve all the documents, with all their metadata values, and then we remove the ones that are not readable by the user and retrieve the sliced part of these documents given the pagination provided. Now, we change this way of doing. We first retrieve all the documents in the project, but with few information, to filter the ones not readable by the user. Then we slice these information to keep the one expected by the pagination. Then we retrieve all the information & metadata values only for the sliced documents. No functional changes expected here. The search must work as before, but without any memory issues (and faster for large number of documents in project). Change-Id: I069cafdd578865772a3a0fc8cb0d9fe7b96e9c9a
Modified Files
Name | ||||
---|---|---|---|---|
M | plugins/docman/include/Docman_ItemDao.class.php | +20 | −3 | Go to diff View file |
M | plugins/docman/include/Docman_ItemFactory.class.php | +122 | −32 | Go to diff View file |