Bug 479684 - Timeline unbearably slow (2+min per click) + vast Memory Leak
Summary: Timeline unbearably slow (2+min per click) + vast Memory Leak
Status: REPORTED
Alias: None
Product: kdenlive
Classification: Applications
Component: Timeline & Editing (other bugs)
Version First Reported In: 23.08.4
Platform: Neon Linux
: NOR grave
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-12 09:01 UTC by anon
Modified: 2024-10-01 19:00 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description anon 2024-01-12 09:01:36 UTC
SUMMARY
neofetch:

OS: KDE neon 5.27 x86_64  Kernel: 6.2.0-39-generic  Shell: bash 5.1.16  Resolution: 1920x1080, 1920x1080  DE: Plasma 5.27.10  CPU: AMD Ryzen 5 3600 (12) @ 3.950GHz  GPU: NVIDIA GeForce GTX 1660 Ti  Memory: 18739MiB / 31994MiB

Kdenlive: 23.08.4


Summary:

Kdenlive's timeline / entire UI becomes impossible to use for large projects.


Performance decreasers & possible causes:

Possible reasons for my particular project are:

- no loop function / mass clip group copy-pasted nodes

- mp3 files cannot be proxied / mass mp3 amount in project bin

- project contains 6 sequences of roughly 40min edited footage each, 1 extra main sequence that imports these sequences and adds background music using mp3s


Performance increasers:

I am barely using animations / transitions, FYI. Further, I have proxied pretty much everything in the entire project. Additionally, I have made sure to try and optimize Kdenlive settings for performance, i.e. disabling thumbnails for 90% of my editing process, modifying clips externally, disabling detrimental experimental features like GPU processing, disabling timeline autoscrolling, etc.


My workflow before the escalation:

When I say it becomes impossible to use I mean I have been editing more or less blindly ever since getting to hour 1 of my multiple hour long footage. I.e. I literally memorize the steps I am performing and perform them blindly while the UI needs usually around 30sec to 1min to catch up.


Why I made this report:

Issue #1

I have now gotten to the point where I am done editing ~5hrs of footage and would like to put it all together in a main sequence and overlay some music. You can image how long of a tedious journey I have come due to UI lagging and occasional crashes, occasional malfunctioning of the video preview etc. Precisely with the addition of a third song though Kdenlive has turned unusable. It now takes FROM A MINIMUM OF 2 UP TO 5 MINUTES to do anything at all. That includes simply clicking on a clip and loading it. Clicking on e.g. a mp3 to open context menu. Adding a keyframe to a loaded clip. Scrolling. Zooming. Clicking on any part of the UI, e.g. Help-menu.

My RAM usage is around 50-70% of 32GiB.

Issue #2

Now for the very fun part:

When I have the video preview running while doing anything else really, e.g. adding a keyframe, clicking on a clip to look at properties, trying to change master volume etc., Kdenlive hangs up entirely, does not ever stop playing the preview and RISES IN RAM USE BY 4-8% PER SECOND UNTIL THE ENTIRE SYSTEM CRASHES. I have been working on 99.7% RAM use for days and at this point I can never even look at the preview. So now I am quite literally blindly editing.


Please fix, I love Kden and I'd hate to choose another editor because of all this.

STEPS TO REPRODUCE
1. Make large Kdenlive project, length > 1hr
2. Let the preview run
3. Tab out / keep editing while the preview is running
4. Attempt stopping the preview by e.g. clicking on a timeline guide

OBSERVED RESULT
UI becomes hardly or entirely unnavigable (1-4hr project has up to 1min loading times per click, e.g. for adding a keyframe, project lengths above have up to 5 min of loading time, lowest being aounrd 2min).
Memory rises continuously until it reaches 100% cap.
App freezes completely. Becomes hardly or entirely unnavigable & unresponsive during the entire process (depending on project size).

EXPECTED RESULT
UI should continue to function at project sizes > 1hr.
RAM shouldnt be leaking uncontrollably.
RAM shouldnt be leaking just because the preview is playing. This works on pretty much all project sizes I have tried.
The preview should stop after a certain threshold to prevent this.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE neon 5.27
KDE Plasma Version: Plasma 5.27.10

ADDITIONAL INFORMATION
https://www.reddit.com/r/kdenlive/comments/194qbs6/timeline_unbearably_slow_2min_per_click_vast/
Comment 1 diekuhrannte@web.de 2024-02-18 18:39:20 UTC
Can you please report whether the problem still exists? Or can we close the bug report?
Comment 2 anon 2024-02-19 07:21:09 UTC
i just tested with my largest project - the particular project i was working on at the time - and yea, kden still becomes extremely slow. the reference project is 14MiB so unfortunately i cannot provide it here
Comment 3 Bug Janitor Service 2024-03-05 03:46:42 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!