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

Multiple Segments have a fairly large performance hit to seek behavior. #1727

Open
5 tasks done
Delerium opened this issue Sep 27, 2023 · 3 comments
Open
5 tasks done

Comments

@Delerium
Copy link

Delerium commented Sep 27, 2023

I have a lot of issues to go through, so in order to make it easier for me to help you, I ask that you please try these things first

Operating System

Windows 10

System Info

AMD Ryzen 5 3600X
32 Gb DDR4-3600 RAM
NVIDIA GeForce RTX 3070

Tested on both my 10TB WD Red NAS Drive (5400 RPM) as well as my extremely fast Samsung 990 Pro 2TB SSD with the same results on both hard drives.

Steps to reproduce

Open a video of any size, Hold down the right arrow to seek through the file and it performs just fine, keeping up with the video. Next, keep adding segments to the timeline and test the right arrow seek.

Expected behavior

Seek performance should not change much as you add segments within typical use cases (It's understandable if you have like 100 or 500 segments, but not under 20)

Actual behavior

As I add more segments, the playback video starts hitching while seeking. Add enough segments and the performance degrades to the point where the video stops when you hold down the right arrow, and doesn't resume until you release it. On my system, it completely stops showing video when seeking at around 16 segments, but I start noticing a performance hit at around 10.

For now, my workaround is to export a partially cut video and re-open it in LosslessCut to finish the rest of the cuts when it gets too unresponsive. Not a huge deal, but I figured I'd report it in case it is something that might cause performance problems other than just seeking.

@YK-SNM
Copy link

YK-SNM commented Apr 1, 2024

Hello, when you have to cut very long videos, it becomes impossible to do it all at once because performance drops as segments are added.
I leave a sample of how it behaves when adding many segments (working on an nvme SSD). It becomes too slow when browsing the timeline.
With less than 15 segments it works well.

cam.2024-03-31.1.mp4

@mifi
Copy link
Owner

mifi commented Apr 10, 2024

I did some testing and it seems to be caused by the side bar. So as a workaround you could hide the sidebar (right) and it should be faster. Will look more into it

@mifi
Copy link
Owner

mifi commented Apr 10, 2024

LosslessCut uses react-sortablejs for the segment list. It seems like it's the culprit. I thought of virtualizing it (so that we don't have to render all the segments, even those not visible), however it doesn't seem to support it. need to find an alternative library that supports sorting as well as virtualization

@mifi mifi mentioned this issue Aug 23, 2024
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants