darktable-org / darktable-org/rawspeed

Improve/cleanup the multi-threading support

Open
#22 27 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
456
Forks
147
PR merge metrics
No merged PRs in 30d

Description

The pthreads based multi-threading code should be improved (IMHO). I see two options:

  1. keep the internal 'explicit' interface more or less like it is but switch from pthreads to c++11 threads.
  2. remove the 'explicit' interface, which should simplify the code significantly and switch to OpenMP where applicable.

I would strongly prefer the second option as is would reduce the complexity of the code and thereby make it a lot easier or even make it possible for the first time to add it where it currently is not. E.g. CR2 files could potentially be decoded in parallel when they are composed of multiple strips. I have not looked into this properly, just wanted to bring up the idea and get feedback from others.

If I see it correctly darktable is also embracing the OpenMP methodology. With recent Apple/Clang compilers supporting it as well platform support should be sufficient.

Contributor guide

Open the contributing guide

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

Begin by locating the pthreads-based multithreading implementation and reviewing how its explicit interface is used. Compare the proposed C++11 threads and OpenMP approaches, including whether parallel decoding could extend to CR2 files composed of multiple strips. The issue does not name files or tests, and done requires a settled design and implementation direction.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.