You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a user creates a new form, or opens a existing form: Open forms always looks up all "reusable" form definitions.
The calls to this endpoint: /api/v2/form-definitions?is_reusable=true&page=1&used_in= are paginated with 24 items per page.
The paginated results contain all the data of the form definition, including translation.
When the total amount of reusable form definition grows, the loading time automatically grows along with it.
Example:
environment with 416 defintions:
Each request takes approx: 600ms x 17 = 10 seconds of loading only form definitions each time a form is opened or a new form is added.
This seems rather long and can only increase with the amount of forms but also extra data (translations) being included in these requests.
The text was updated successfully, but these errors were encountered:
LaurensBurger
added
bug
Something isn't working
triage
Issue needs to be validated. Remove this label if the issue considered valid.
labels
Sep 19, 2023
LaurensBurger
changed the title
Slowdown due to reusable form defintions lookup when loading a form.
Slowdown due to reusable form defintions lookup when loading/starting a form.
Sep 19, 2023
Refinement: We can create a separate endpoint to only return the name/uuid to prevent the heaps of data returned for the pulldown. We do need to refactor the client to retrieve the form definition detail when you actually want to use it. Pagination can be dropped for this endpoint. Sergei is not convinced so i'll let this sink in a bit.
Product versie / Product version
2.3.0
Omschrijf het probleem / Describe the bug
Internal: LV 107
When a user creates a new form, or opens a existing form: Open forms always looks up all "reusable" form definitions.
The calls to this endpoint: /api/v2/form-definitions?is_reusable=true&page=1&used_in= are paginated with 24 items per page.
The paginated results contain all the data of the form definition, including translation.
When the total amount of reusable form definition grows, the loading time automatically grows along with it.
Example:
environment with 416 defintions:
Each request takes approx: 600ms x 17 = 10 seconds of loading only form definitions each time a form is opened or a new form is added.
This seems rather long and can only increase with the amount of forms but also extra data (translations) being included in these requests.
The text was updated successfully, but these errors were encountered: