Bug 474564 - Inserting and removing time operations are very slow in a long project
Summary: Inserting and removing time operations are very slow in a long project
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface & Miscellaneous (show other bugs)
Version: 23.08.0
Platform: Debian unstable Linux
: NOR minor
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-15 17:44 UTC by jackleberry
Modified: 2023-09-17 00:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jackleberry 2023-09-15 17:44:00 UTC
SUMMARY

Inserting and removing time operations are very slow in a large project. The project is about 5 hours long with many, many small clips. Inserting or removing time near the beginning takes several minutes to complete, with no feedback in the interface that any work is being done (such as the progress indicator seen when analyzing audio).

Probably much unnecessary work (maybe triggering redraws or similar) is being done for each clip whose offset is being adjusted, as the delay is proportional to the number of clips after the playhead.

STEPS TO REPRODUCE
1.  Have a very long project
2.  Insert or remove time near the beginning

OBSERVED RESULT

Takes an unreasonable amount of time

EXPECTED RESULT

Works instantly.

ADDITIONAL INFORMATION

None
Comment 1 jackleberry 2023-09-17 00:12:48 UTC
Console output during the delay consists of lots of entries like this (about 1 to 3 seconds between each):

warp LENGTH 493
Reusing timewarp producer!
warp LENGTH 360
Reusing timewarp producer!
warp LENGTH 360

And this at the end when the program becomes responsive again:

:::: DURATION FOR TIMELINE MODE: 540039  =  540015
::: UPDATING MAIN TIMELINE DURATION:  540039

I've also noticed that Insert Time (all tracks) sometimes (randomly?) inserts the time before the beginning of the clip to the left of the playhead, rather than where the playhead is located (which is at the joint between two clips).