LMMS / LMMS/lmms

Long blocking tasks with requestChangeInModel should be avoided

Open
#5,074 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core enhancement
Dominant language
C++
Stars
10.4k
Forks
1.3k
Avg merge
2d 13h
Merged PRs (30d)
7

Description

We have `Mixer::requestChangeInModel()` which allows running jobs while the `Mixer` is not processing audio. However, if some code runs long in a `requestChangeInModel` ~ `doneChangeInModel` block, it may block audio processing for a long time.

A good example is `Song::loadProject()`. If the project file is large, this function may block audio processing for >10s. `VestigeInstrumentView::openPlugin()` can also block processing.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing Mixer::requestChangeInModel() and doneChangeInModel(), then inspect Song::loadProject() and VestigeInstrumentView::openPlugin() as examples of long-running work. The change is done when these operations no longer block audio processing for an extended period, with the approach established for both entry points.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
audio-video-rtc, desktop
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.