Open ammar92 opened 4 months ago
This indeed leads to repeatedly calling https://github.com/minvws/nl-kat-coordination/blob/2a6e2e3b59ca030cc2fcf89cac3d240f56f990db/boefjes/boefjes/katalogus/dependencies/plugins.py#L190
We should probably also look into using PluginEnabledStorage.get_all_enabled
instead somewhere
Is your feature request related to a problem? Please describe. Currently when listing a KATalogus page from Rocky (such as listing type of plugins or a viewing a specific plugin), the page load time exceeds 300 ms. This is mainly due to a lot of individual SQL queries performed within the KATalogus backend. This could be caused by the way we use dependency injection within FastAPI or other simple factors.
Describe the solution you'd like I'd like to see less queries performed, especially in the detail view. And in the list view we should use a broader SQL query rather than per plugin based queries. In any case they should probably not be the same query. But first we should investigate the root cause by analyzing the code.
Additional context
These seems to be repeated SQL calls with the following query: