Skip to content

✨ [#538] Improve performance and add tests#596

Merged
danielmursa-dev merged 4 commits intomasterfrom
feature/538-performance-tests
May 20, 2025
Merged

✨ [#538] Improve performance and add tests#596
danielmursa-dev merged 4 commits intomasterfrom
feature/538-performance-tests

Conversation

@danielmursa-dev
Copy link
Contributor

@danielmursa-dev danielmursa-dev commented May 15, 2025

Fixes #538

  • Added PyInstrumentMiddleware for profiling
  • Extended performance test action with locust execution
  • Fixed get_queryset with select_related
  • Changed ObjectUrlField to CachedObjectUrlField

GeometryField issue -> #538 (comment)

Results before improvements:

Results after improvements:

@codecov-commenter
Copy link

codecov-commenter commented May 15, 2025

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 94.68%. Comparing base (ebc4ae8) to head (b8e445c).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/objects/api/fields.py 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #596      +/-   ##
==========================================
- Coverage   94.77%   94.68%   -0.09%     
==========================================
  Files         148      148              
  Lines        5164     5171       +7     
==========================================
+ Hits         4894     4896       +2     
- Misses        270      275       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@danielmursa-dev danielmursa-dev force-pushed the feature/538-performance-tests branch 10 times, most recently from 47c48ff to a7b47a6 Compare May 15, 2025 14:30
Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@danielmursa-dev the changes themselves looks good, but I can't see if the concurrent performance changed after them. Could you maybe reorder the commits to first add the performance tests, run them to see the current performance and then push the changes to see how they affect the response times?

@stevenbal
Copy link
Collaborator

In the meantime we'll probably have to wait until we have more info from Utrecht, Alex mentioned in the taiga issue that we can't see the tracing info in APM for the slow requests

@danielmursa-dev danielmursa-dev force-pushed the feature/538-performance-tests branch from a7b47a6 to ae8662f Compare May 19, 2025 11:42
@danielmursa-dev danielmursa-dev requested a review from stevenbal May 19, 2025 12:12
@stevenbal
Copy link
Collaborator

@danielmursa-dev you can rebase on master to fix the failing image scanning job

@danielmursa-dev danielmursa-dev force-pushed the feature/538-performance-tests branch 2 times, most recently from d16120e to 38a5221 Compare May 19, 2025 12:34
@danielmursa-dev danielmursa-dev force-pushed the feature/538-performance-tests branch from 38a5221 to 00ad87f Compare May 19, 2025 12:43
Copy link
Collaborator

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does improve performance so I'll approve, but I don't think this solves the issue that's causing the outliers in the taiga issue, so I'll keep the github issue open for now. We'll have to hear back from Sander once he's done more tests (with the transaction rate in elastic APM set to 1, to make sure we have more trace info) or do tests ourselves to figure this out I think

@danielmursa-dev danielmursa-dev merged commit 1cb73ad into master May 20, 2025
22 checks passed
@danielmursa-dev danielmursa-dev deleted the feature/538-performance-tests branch May 20, 2025 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad performance when doing API call on /objects

3 participants