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

[save-images] Add multithreaded version of save-images #456

Merged
merged 4 commits into from
Nov 24, 2024

Conversation

Breakthrough
Copy link
Owner

@Breakthrough Breakthrough commented Nov 10, 2024

This improves performance by over 50% in some cases.

Open tasks:

@Breakthrough Breakthrough marked this pull request as draft November 10, 2024 03:23
@Breakthrough Breakthrough force-pushed the main branch 2 times, most recently from 85d1bdd to 2c55a55 Compare November 13, 2024 03:03
scenedetect/__init__.py Fixed Show fixed Hide fixed
scenedetect/__init__.py Fixed Show fixed Hide fixed
scenedetect/scene_manager.py Fixed Show fixed Hide fixed
scenedetect/__init__.py Fixed Show fixed Hide fixed
scenedetect/__init__.py Fixed Show fixed Hide fixed
@Breakthrough Breakthrough force-pushed the issue-450-save-images branch 2 times, most recently from 921f535 to 963a5dc Compare November 16, 2024 23:49
scenedetect/__init__.py Fixed Show fixed Hide fixed
scenedetect/__init__.py Fixed Show fixed Hide fixed
scenedetect/postprocess/images.py Fixed Show fixed Hide fixed
scenedetect/scene_manager.py Fixed Show fixed Hide fixed
@Breakthrough Breakthrough force-pushed the issue-450-save-images branch 2 times, most recently from bb2bbff to 15e5aab Compare November 18, 2024 01:15
scenedetect/scene_manager.py Dismissed Show dismissed Hide dismissed
This improves performance by over 50% in some cases.

This should also fix #450 since we use the Path module for files now instead
of OpenCV's imwrite.
The save_images function was getting quite complex and difficult to maintain,
especially with the multithreaded version. This breaks it out into an object
with smaller functions.  The existing save_images function can be implemented
using this new object.
Ensure errors are re-raised safely from worker threads by using non-blocking
puts and monitoring a common error queue.
@Breakthrough Breakthrough modified the milestones: 0.6.6, 0.6.5 Nov 24, 2024
@Breakthrough Breakthrough self-assigned this Nov 24, 2024
@Breakthrough Breakthrough requested a review from wjs018 November 24, 2024 21:58
@Breakthrough Breakthrough marked this pull request as ready for review November 24, 2024 21:59
@Breakthrough Breakthrough merged commit 95091f8 into main Nov 24, 2024
42 checks passed
@Breakthrough Breakthrough deleted the issue-450-save-images branch November 24, 2024 22:13
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.

1 participant