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

Chunk preparation optimization #7081

Merged
merged 8 commits into from
Nov 2, 2023
Merged

Conversation

azhavoro
Copy link
Contributor

@azhavoro azhavoro commented Oct 30, 2023

This PR speeds up the preparation of chunks by:

  1. loading images once instead of twice in each writer,
  2. as well as by allowing simultaneous preparation of more than 1 chunk using multithreading.
    This allows to reduce the time for preparation of chunks for 4895 images from 0:04:36 to 0:01:20 in case of preparation of 3 chunks in parallel and 0:02:46 in case of 1 chunk in my environment.

Motivation and context

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

Merging #7081 (1c0cd66) into develop (ba3db01) will increase coverage by 0.00%.
Report is 2 commits behind head on develop.
The diff coverage is 95.38%.

@@           Coverage Diff            @@
##           develop    #7081   +/-   ##
========================================
  Coverage    82.31%   82.32%           
========================================
  Files          361      361           
  Lines        39263    39290   +27     
  Branches      3588     3588           
========================================
+ Hits         32321    32344   +23     
- Misses        6942     6946    +4     
Components Coverage Δ
cvat-ui 77.29% <ø> (ø)
cvat-server 86.92% <95.38%> (-0.01%) ⬇️

cvat/apps/engine/task.py Outdated Show resolved Hide resolved
Co-authored-by: Maria Khrustaleva <maya17grd@gmail.com>
@nmanovic nmanovic merged commit 0535d45 into develop Nov 2, 2023
34 checks passed
@nmanovic nmanovic deleted the az/optimization_creation_of_tasks branch November 2, 2023 15:59
@cvat-bot cvat-bot bot mentioned this pull request Nov 3, 2023
bsekachev pushed a commit that referenced this pull request Nov 6, 2023
This PR speeds up the preparation of chunks by: 
1. loading images once instead of twice in each writer,
2. as well as by allowing simultaneous preparation of more than 1 chunk
using multithreading.
This allows to reduce the time for preparation of chunks for 4895 images
from 0:04:36 to 0:01:20 in case of preparation of 3 chunks in parallel
and 0:02:46 in case of 1 chunk in my environment.

Co-authored-by: Maria Khrustaleva <maya17grd@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants