Skip to content
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

Remove unnecessary COUNT for labels #6918

Merged
merged 23 commits into from
Oct 18, 2023
Merged

Remove unnecessary COUNT for labels #6918

merged 23 commits into from
Oct 18, 2023

Conversation

nmanovic
Copy link
Contributor

Optimized /api/projects, /api/tasks, and /api/jobs requests. Previously for unification, we decided to add a count of labels into every response for each project, task, and job. It leads to performance issues. UI and probably other clients don't use the information because it is useless. Removing it, helps to optimize the SQL request several times.

@nmanovic
Copy link
Contributor Author

Before:
image

After:
image

cvat/apps/engine/views.py Outdated Show resolved Hide resolved
@bsekachev bsekachev self-requested a review as a code owner October 2, 2023 09:46
@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #6918 (27d9ba8) into develop (e6724fa) will increase coverage by 0.00%.
Report is 7 commits behind head on develop.
The diff coverage is 94.11%.

@@           Coverage Diff            @@
##           develop    #6918   +/-   ##
========================================
  Coverage    82.31%   82.32%           
========================================
  Files          361      361           
  Lines        39168    39167    -1     
  Branches      3586     3586           
========================================
  Hits         32243    32243           
+ Misses        6925     6924    -1     
Components Coverage Δ
cvat-ui 77.28% <ø> (ø)
cvat-server 86.96% <94.11%> (+<0.01%) ⬆️

changelog.d/20231011_162748_nikita_fix_perf_issues.md Outdated Show resolved Hide resolved
changelog.d/20231011_162748_nikita_fix_perf_issues.md Outdated Show resolved Hide resolved
tests/python/shared/fixtures/data.py Outdated Show resolved Hide resolved
tests/python/rest_api/test_tasks.py Outdated Show resolved Hide resolved
@SpecLad SpecLad merged commit 736881b into develop Oct 18, 2023
33 checks passed
@SpecLad SpecLad deleted the nm/fix_perf_issues branch October 18, 2023 12:36
@cvat-bot cvat-bot bot mentioned this pull request Oct 23, 2023
mikhail-treskin pushed a commit to retailnext/cvat that referenced this pull request Oct 25, 2023
Optimized /api/projects, /api/tasks, and /api/jobs requests. Previously
for unification, we decided to add a count of labels into every response
for each project, task, and job. It leads to performance issues. UI and
probably other clients don't use the information because it is useless.
Removing it, helps to optimize the SQL request several times.

---------

Co-authored-by: Boris Sekachev <boris@cvat.ai>
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.

3 participants