Speedup timeline operations
Currently, in the refactored timeline, we use a completely different MLT producer for each clip. One major drawback is for example when we cut a clip, we need to do:
- Resize original clip
- Create a new MLT producer from scratch by re-reading the video source file
- Insert newly created clip in timeline.
Operation 2. can be slow. On a fast computer, when using 4k source material, there is a 1 second lag on clip cut, which makes the whole interface seem laggy.
This can be solved by using the same approach we used in stable Kdenlive: using one producer per track for each clip. This way, when cutting a clip, step 2 simply creates a new instance of the track producer. Cutting the same 4k clip is now very fast, no visible delay in the UI.
Attached patch achieves this (breaks the tests, and some polishing will be necessary). Patch is available here: https://invent.kde.org/kde/kdenlive/snippets/37