-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Performance optimization: list endpoints slow due to permission checks #1365
Comments
stevenbal
changed the title
Performance optimization: EnkelvoudigInformatieObject list endpoint
Performance optimization: list endpoints slow due to permission checks
Apr 18, 2023
I looked into this, I noticed that removing ordering from the authorization query improves performance by quite a bit, but it still remains fairly slow due to the inner join it seems |
stevenbal
added a commit
that referenced
this issue
Apr 18, 2023
stevenbal
added a commit
that referenced
this issue
May 8, 2023
stevenbal
added a commit
that referenced
this issue
May 8, 2023
stevenbal
added a commit
that referenced
this issue
May 15, 2023
the .count for pagination is a big performance bottleneck. To fix this, a limit of 500 is set for the count to keep pagination links functioning and improve performance
stevenbal
added a commit
that referenced
this issue
May 15, 2023
the .count for pagination is a big performance bottleneck. To fix this, a limit of 500 is set for the count to keep pagination links functioning and improve performance
stevenbal
added a commit
that referenced
this issue
May 15, 2023
the .count for pagination is a big performance bottleneck. To fix this, a limit of 500 is set for the count to keep pagination links functioning and improve performance
stevenbal
added a commit
that referenced
this issue
May 15, 2023
the .count for pagination is a big performance bottleneck. To fix this, a limit of 500 is set for the count to keep pagination links functioning and improve performance
stevenbal
added a commit
that referenced
this issue
May 15, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
the .count for pagination is a big performance bottleneck. To fix this, a limit of 500 is set for the count to keep pagination links functioning and improve performance
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
the .count for pagination is a big performance bottleneck. To fix this, a limit of 500 is set for the count to keep pagination links functioning and improve performance
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
May 16, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
the original query first fetched the pks for the authorized objects and used those in a filter on the original queryset. This caused bad performance for big querysets, especially if DISTINCT was used (EIO/zaak). Now this step is skipped and the objects are fetched directly
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
EnkelvoudigInformatieObject is not marked with the fuzzy pagination parameter, because this functionality is disabled for CMIS and CMIS_ENABLED=True when generating the schema
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
the .count for pagination is a big performance bottleneck. To fix this, a limit of 500 is set for the count to keep pagination links functioning and improve performance
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
the original query first fetched the pks for the authorized objects and used those in a filter on the original queryset. This caused bad performance for big querysets, especially if DISTINCT was used (EIO/zaak). Now this step is skipped and the objects are fetched directly
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
EnkelvoudigInformatieObject is not marked with the fuzzy pagination parameter, because this functionality is disabled for CMIS and CMIS_ENABLED=True when generating the schema
stevenbal
added a commit
that referenced
this issue
Jun 6, 2023
I made a ticket for this at VNG: VNG-Realisatie/gemma-zaken#2284 |
I'll separate this into two parts:
The first part doesn't create deviations from the standard, but can add some performance boost, so I'll add it in Release 1.9 |
annashamray
added a commit
that referenced
this issue
Jul 13, 2023
annashamray
pushed a commit
that referenced
this issue
Jul 14, 2023
annashamray
pushed a commit
that referenced
this issue
Jul 14, 2023
the original query first fetched the pks for the authorized objects and used those in a filter on the original queryset. This caused bad performance for big querysets, especially if DISTINCT was used (EIO/zaak). Now this step is skipped and the objects are fetched directly
annashamray
pushed a commit
that referenced
this issue
Jul 14, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Master US - #1344
Taiga issue 454
Performance testing showed that several list endpoints are slowed down if a JWT without superuser permissions:
Notes:
count
for pagination seems to be the bottleneck here as well, in this case because the query contains anINNER JOIN
on thezaken_zaak
table, which seems to reduce performance significantly. I tested locally with a simple query:SELECT COUNT(*) FROM "zaken_rol" INNER JOIN "zaken_zaak" ON ("zaken_rol"."zaak_id" = "zaken_zaak"."identificatie_ptr_id")
, this query takes around 800ms on my machineUpd. by Anna
The optimization is done in several steps (and PRs):
The text was updated successfully, but these errors were encountered: