Content
View differences
Updated by Jens Ulferts about 9 years ago
The implementation of the form configuration has introduced code that causes the work package list to be loaded very slowly in production scenarios where a lot of custom fields exist.
Currently, two requests seem to be affected:
- `/api/v3/work_packages` - in particular loading the schemas embedded in the response.
- `/api/experimental/projects/:project_id`
Please note, that the later will no longer be used once https://github.com/opf/openproject/pull/5219 is merged.
In my development environment using anonymized production data, when loading a work package list with 50 work packages, those two requests combined need about 30 seconds to complete.
There seems to be an n + 1 query in place which scales by `[Number of work packages] * [Number of custom fields]` which given my data results in about 11000 DB requests (a lot of them are cached).
Currently, two requests seem to be affected:
- `/api/v3/work_packages` - in particular loading the schemas embedded in the response.
- `/api/experimental/projects/:project_id`
Please note, that the later will no longer be used once https://github.com/opf/openproject/pull/5219 is merged.
In my development environment using anonymized production data, when loading a work package list with 50 work packages, those two requests combined need about 30 seconds to complete.
There seems to be an n + 1 query in place which scales by `[Number of work packages] * [Number of custom fields]` which given my data results in about 11000 DB requests (a lot of them are cached).