[TOC]
Ansel is a better future for Darktable, designed from real-life use cases and solving actual problems, by the guy who did the scene-referred workflow and spent these past 4 years working full-time on Darktable.
It is forked on Darktable 4.0, and is compatible with editing histories produced with Darktable 4.0 and earlier. It is not compatible with Darktable 4.2 and later and will not be, since 4.2 introduces irresponsible choices that will be the burden of those who commited them to maintain, and 4.4 will be even worse.
The end goal is :
- to produce a more robust and faster software, with fewer opportunities for weird, contextual bugs that can't be systematically reproduced, and therefore will never be fixed,
- to break with the trend of making Darktable a Vim editor for image processing, truly usable only from (broken) keyboard shortcuts known only by the hardcore geeks that made them,
- to sanitize the code base in order to reduce the cost of maintenance, now and in the future,
- to make the general UI nicer to people who don't have a master's in computer science and more efficient to use for people actually interested in photography, especially for folks using Wacom (and other brands) graphic tablets,
- to optimize the GUI to streamline the scene-referred workflow and make it feel more natural.
Ultimately, the future of Darktable is vkdt, but this will be available only for computers with GPU and is a prototype that will not be usable by a general audience for the next years to come. Ansel aims at sunsetting Darktable with something "finished", pending a VKDT version usable by common folks.
The virtual 0.0.0
pre-release
contains nightly builds, with Linux .Appimage
and Windows .exe
, compiled automatically
each night with the latest code, and containing all up-to-date dependencies.
Ansel is developped on Fedora, heavily tested on Ubuntu and fairly tested on Windows.
Mac OS and, to a lesser extent, Windows have known GUI issues that come from using Gtk as a graphical toolkit. Not much can be done here, as Gtk suffers from a lack of Windows/Mac devs too. Go and support these projects so they can have more man-hours put on fixing those.
Mac OS support is not active, because :
- the continuous integration (CI) bot for Mac OS breaks on a weekly basis, which needs much more maintenance than Linux or even Windows,
- only 4% of the Darktable user base runs it, and it's unfair to Linux and Windows users to allocate more resources to the minority OS,
- I don't own a Mac box to debug,
- I don't have an (expensive) developer key to sign .dmg packages,
- even Windows is not that much of a PITA to maintain.
A couple of nice guys are trying their best to fix issues on Mac OS in a timely manner. They have jobs, families, hobbies and vacations too, so Mac OS may work or it may not, there is not much I can do about it.
- User documentation, in particular:
- Contributing guidelines, in particular:
- Developer documentation (NEW)
- Project news
- Community forum
- Matrix chatrooms
- Support
Ansel was forked from Darktable after commit 7b88fdd7afe7b8530a992ae3c12e7a088dc9e992, 1 month before Darktable 4.0 release (output truncated to relevant languages):
$ cloc --git --diff 7b88fdd7afe7b8530a992ae3c12e7a088dc9e992 HEAD
github.com/AlDanial/cloc v 2.02 T=227.18 s (2.9 files/s, 4772.1 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
C
same 0 0 22679 206655
modified 266 0 1065 7568
added 20 2173 3179 18999
removed 48 6678 5391 52121
C/C++ Header
same 0 0 5221 12296
modified 100 0 198 547
added 17 726 1053 2901
removed 9 300 743 2629
C++
same 0 0 791 6731
modified 8 0 20 177
added 1 325 280 2205
removed 1 320 243 2028
CSS
same 0 0 0 0
modified 0 0 0 0
added 3 324 357 1794
removed 13 419 519 9575
...
--------------------------------------------------------------------------------
SUM:
same 0 0 56479 485138
modified 495 0 108949 47745
added 89 15405 40475 116326
removed 186 25324 99358 195399
--------------------------------------------------------------------------------
$ cloc --git 7b88fdd7afe7b8530a992ae3c12e7a088dc9e992
github.com/AlDanial/cloc v 2.02 T=3.70 s (286.4 files/s, 327937.4 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
C 439 51319 37122 303148
C/C++ Header 284 7286 11522 24848
C++ 11 1489 1138 9899
CSS 20 564 617 10353
...
--------------------------------------------------------------------------------
SUM: 1160 221925 280733 832393
--------------------------------------------------------------------------------
$ cloc --git HEAD
github.com/AlDanial/cloc v 2.02 T=3.70 s (286.4 files/s, 327937.4 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
C 410 46644 34834 270030
C/C++ Header 292 7589 11675 24926
C++ 11 1492 1175 10089
CSS 10 469 455 2572
...
--------------------------------------------------------------------------------
SUM: 1062 211610 243588 800478
--------------------------------------------------------------------------------
The volume of C code has therefore been reduced by 11%, the volume of CSS (for theming)
by 75%. Excluding the pixel operations (cloc --fullpath --not-match-d=/src/iop --git
),
the C code volume has reduced by 15%.
The cyclomatic complexity of the project has also been reduced reduced:
Metric | Ansel Master | Darktable 4.0 | Darktable 5.0 |
---|---|---|---|
Cyclomatic complexity | 48906 | 56170 | 59377 |
Cognitive complexity | 62083 | 72743 | 77039 |
Lines of code | 318927 | 361046 | 370781 |
Ratio of comments | 12.3% | 11.5% | 11.7% |
Those figures are indirect indicators of the long-term maintainability of the project:
- comments document the code and are used by Doxygen to build the dev docs,
- code volume and complexity make bugs harder to find and fix properly, and lead to more cases to cover with tests,
- code volume and complexity prevent from finding optimization opportunities,
- let's remember that it's mostly the same software with pretty much the same features anyway.
Dealing with growing features should be made through modularity, that is splitting the app features into modules, enclosing modules into their own space, and make modules independent from each other's internals. We will see below how those "modules" behave (spoiler 1: that this did not happen), (spoiler 2: feel free to go the dev docs, where all functions have their dependency graph in their doc, to witness that "modules" are not even modular, and the whole application is actually aware of the whole application).
Let's see a comparison of Ansel vs. Dartable 4.0 and 5.0 complexity per file/feature (figures are: cyclomatic complexity / lines of code excluding comments - lower is better) :
File | Description | Ansel Master | Darktable 4.0 | Darktable 5.0 |
---|---|---|---|---|
src/common/selection.c |
Database images selection backend | 57 / 258 | 62 / 342 | 62 / 394 |
src/common/act_on.c |
GUI images selection backend | 12 / 32 | 80 / 297 | 80 / 336 |
src/common/collection.c |
Image collection extractions from library database | 396 / 1561 | 532 / 2133 | 553 / 2503 |
src/develop/pixelpipe_hb.c |
Pixel pipeline processing backbone | 450 / 2183 | 473 / 2013 | 553 / 2644 |
src/develop/pixelpipe_cache.c |
Pixel pipeline image cache* | 29 / 153 | 55 / 242 | 95 / 368 |
src/common/mipmap_cache.c |
Lighttable thumbnails cache | 185 / 1012 | 193 / 1048 | 225 / 1310 |
src/develop/develop.c |
Development history & pipeline backend (original) | - | 600 / 2426 | 628 / 2732 |
src/develop/develop.c |
Development pipeline backend (refactored) | 296 / 1089 | - | - |
src/develop/dev_history.c |
Development history backend (refactored from develop.c ) |
264 / 1216 | - | - |
src/develop/imageop.c |
Pixel processing module API | 531 / 2264 | 617 / 2513 | 692 / 3181 |
src/control/jobs/control_jobs.c |
Background thread tasks | 315 / 1962 | 308 / 1904 | 394 / 2475 |
*: to this day, Darktable pixel pipeline cache is still broken as of 5.0, which clearly shows that increasing its complexity was not a solution:
File | Description | Ansel Master | Darktable 4.0 | Darktable 5.0 |
---|---|---|---|---|
src/bauhaus/bauhaus.c |
Custom Gtk widgets (sliders/comboboxes) for modules | 470 / 2344 | 653 / 2833 | 751 / 3317 |
src/gui/accelerators.c |
Key shortcuts handler | 88 / 342 | 1088 / 3546 | 1245 / 5221 |
src/views/view.c |
Base features of GUI views | 223 / 782 | 298 / 1105 | 325 / 1865 |
src/views/darkroom.c |
Darkroom GUI view | 374 / 2041 | 736 / 3558 | 560 / 2776 |
src/libs/modulegroups.c |
Groups of modules in darkroom GUI | 149 / 608 | 554 / 3155 | 564 / 3322 |
src/views/lighttable.c |
Lighttable GUI view | 17 / 152 | 227 / 1002 | 237 / 1007 |
src/dtgtk/thumbtable.c |
Lighttable & filmroll grid of thumbnails view | 359 / 1493 | 533 / 2146 | 559 / 2657 |
src/dtgtk/thumbnail.c |
Lighttable & filmroll thumbnails | 199 / 1002 | 345 / 1622 | 332 / 1841 |
src/libs/tools/filter.c |
Darktable 3.x Lighttable collection filters & sorting (original) | 85 / 620 | - | - |
src/libs/filters |
Darktable 4.x Lighttable collection filters (modules) | - | 453 / 2296 | 504 / 2664 |
src/libs/filtering.c |
Darktable 4.x Lighttable collection filters (main widget) | - | 245 / 1633 | 290 / 1842 |
src/common/import.c |
File import popup window | 130 / 915 | 309 / 1923 | 334 / 2309 |
All runtimes computed on a Lenovo Thinkpad P51 laptop (Intel Xeon CPU E3-1505M v6 @ 3.00GHz, Nvidia GPU Quadro M2200 4 GB vRAM, 32 GB RAM, 4K display), CPU in performance mode, Linux Fedora 41 with KDE/Plasma desktop. Pixel pipeline runtimes are not compared since Ansel 0.1-alpha shares its pixel code with Darktable 4.0 by design (compatibility).
Description | Ansel Master | Darktable 5.0 |
---|---|---|
Time from app startup to last lighttable thumbnail drawing (same collection) | 2.75 s | 7.49 s |
Time to switch from lighttable to darkroom (same image) | 0.2 s | 1.2 s |
Time to scroll (start->end) through the same collection of 471 images* | 0.7 s | 5.0 s |
*: thumbnails preloaded in disk cache in both cases, 5 thumbs columns/row, 4K resolution, no right sidebar.
The following have been measured on battery, in powersave mode, with the application sitting idle (no user interaction) for 5 minutes, using Intel Powertop. The baseline consumption of the whole idle OS is 1.6 % CPU. (Power is given for the app only, % CPU is given for the whole system):
View | Ansel Master | Darktable 5.0 |
---|---|---|
Lighttable | 1.8 % CPU, power: 6.8 mW | 2.7 % CPU, power: 103 mW |
Darkroom | 1.8 % CPU, power: 10.3 mW | 1.8 % CPU, power: 22 mW |
TL;DR: Darktable is leaking performance by the GUI, and the tedious work done in 2023-2024 on optimizing pixel processing modules for an extra 15-50 ms is completely irrelevant.
Github doesn't show anymore the contributions for repositories having more than 10.000 commits…
$ git shortlog -sn --no-merges
4295 Pascal Obry
3597 johannes hanika
2565 Aurélien PIERRE
2127 Tobias Ellinghaus
2083 Roman Lebedev
1757 Henrik Andersson
1527 Ulrich Pegelow
1250 Aldric Renaudin
948 Pascal de Bruijn
841 Pedro Côrte-Real
692 Ralf Brown
604 Jérémy Rosen
601 Dan Torop
566 Diederik ter Rahe
546 Philippe Weyland
516 Hanno Schwalm
430 Hubert Kowalski
355 parafin
331 Ger Siemerink
286 Chris.Elston
283 Jeronimo Pellegrini
276 rawfiner
243 Nicolas Auffray
236 José Carlos García Sogo
207 Andreas Schneider
200 EdgarLux
195 Robert Bieber
192 Michel Leblond
183 Richard Levitte
180 Heiko Bauke
172 Edouard Gomez
162 Stefan Schöfegger
155 edgardoh
140 Miloš Komarčević
126 Peter Budai
122 Victor Forsiuk
103 Bill Ferguson
101 Simon Spannagel
100 Alynx Zhou
93 Jean-Sébastien Pédron
90 Martin Straeten
83 Olivier Tribout
76 Alexandre Prokoudine
73 Mark-64
67 Bruce Guenter
66 Sakari Kapanen
61 Timur Davletshin
55 Matthieu Moy
55 bartokk
50 Rostyslav Pidgornyi
49 Chris Elston
48 Moritz Lipp
48 tatica
44 Dennis Gnad
43 Marco Carrarini
42 Christian Tellefsen
41 Josep V. Moragues
39 Matt Maguire
38 Matthieu Volat
38 Maurizio Paglia
36 Daniel Vogelbacher
36 Jakub Filipowicz
35 Thomas Pryds
32 David-Tillmann Schaefer
32 GrahamByrnes
32 Harold le Clément de Saint-Marcq
31 Marco
30 Guillaume Stutin
30 marcel
28 wpferguson
27 HansBull
27 Kaminsky Andrey
27 Matjaž Jeran
25 mepi0011
25 shlomi braitbart
24 Michal Babej
23 lhietal
22 quovadit
21 Antony Dovgal
21 Jacques Le Clerc
21 Milan Knížek
20 Sam Smith
19 Richard Wonka
19 Ryo Shinozaki
18 Jiyone
18 Rikard Öxler
18 darkelectron
17 Guillaume Marty
16 Alexis Mousset
16 Báthory Péter
16 Dimitrios Psychogios
16 José Carlos Casimiro
16 Wolfgang Goetz
15 Guilherme Brondani Torri
15 U-DESKTOP-HQME86J\marco
15 Vasyl Tretiakov
15 Vincent THOMAS
14 Brian Teague
14 Frédéric Grollier
14 lologor
14 luzpaz
13 Kevin Vermassen
13 Marcus Gama
13 Novy Sawai
13 Philipp Lutz
13 Robert Bridge
12 Germano Massullo
12 James C. McPherson
12 Victor Lamoine
11 Andrew Toskin
11 Eckhart Pedersen
11 Felipe Contreras
11 Mikko Ruohola
10 Asma
10 Bernd Steinhauser
10 Kanstantsin Shautsou
10 Martin Burri
10 Serkan ÖNDER
10 Tomasz Golinski
10 Victor Engmark
10 Wyatt Olson
10 junkyardsparkle
10 thisnamewasnottaken
9 Arnaud TANGUY
9 Fabio Heer
9 JohnnyRun
9 Loic Guibert
9 Paolo DePetrillo
9 Žilvinas Žaltiena
8 Benoit Brummer
8 Dušan Kazik
8 Jan Kundrát
8 Jochen Schroeder
8 Matteo Mardegan
8 Petr Styblo
8 Robert William Hutton
8 Roman Khatko
8 Stuart Henderson
8 itinerarium
8 luz paz
8 vertama
8 vrnhgd
7 Ammon Riley
7 Chris Hodapp
7 David Bremner
7 Gaspard Jankowiak
7 Ivan Tarozzi
7 Jim Robinson
7 Marcello Mamino
7 Marcus Rückert
7 Richard Hughes
7 calca
7 elstoc
7 篠崎亮 Ryo Shinozaki
6 Artur de Sousa Rocha
6 Cherrot Luo
6 Christian Himpel
6 Denis Dyakov
6 Dominik Markiewicz
6 Guillaume Benny
6 Harald
6 Jesper Pedersen
6 Maximilian Trescher
6 Petr Stasiak
6 Pierre Lamot
6 Sergey Pavlov
6 Stephan Hoek
6 Wolfgang Mader
6 grand-piano
6 piratenpanda
6 solarer
5 August Schwerdfeger
5 JP Verrue
5 Johanes Schneider
5 K. Adam Christensen
5 Karl Mikaelsson
5 Luca Zulberti
5 Matthias Gehre
5 Matthias Vogelgesang
5 Simon Legner
5 Tianhao Chai
5 Torsten Bronger
5 matt-maguire
$ git shortlog -sn --no-merges --since "JUN 1 2022"
1576 Aurélien PIERRE
100 Alynx Zhou
30 Guillaume Stutin
24 Hanno Schwalm
18 Jiyone
17 Guillaume Marty
14 lologor
11 Miloš Komarčević
10 Sakari Kapanen
9 Maurizio Paglia
9 Victor Forsiuk
6 Pascal Obry
5 Luca Zulberti
4 Alban Gruin
4 Ricky Moon
3 Sidney Markowitz
2 Diederik ter Rahe
2 Marrony Neris
2 Miguel Moquillon
2 Roman Neuhauser
2 parafin
1 Aldric Renaudin
1 André Doherty
1 Chris Elston
1 Germano Massullo
1 Jehan Singh
1 Marc Cousin
1 Philippe Weyland
1 Ralf Brown
1 Roman Lebedev
1 naveen
1 realSpok
1 tatu
$ git shortlog -sn --no-merges --before "JUN 1 2022"
4289 Pascal Obry
3597 johannes hanika
2127 Tobias Ellinghaus
2082 Roman Lebedev
1757 Henrik Andersson
1527 Ulrich Pegelow
1249 Aldric Renaudin
989 Aurélien PIERRE
948 Pascal de Bruijn
841 Pedro Côrte-Real
691 Ralf Brown
604 Jérémy Rosen
601 Dan Torop
564 Diederik ter Rahe
545 Philippe Weyland
492 Hanno Schwalm
430 Hubert Kowalski
353 parafin
331 Ger Siemerink
286 Chris.Elston
283 Jeronimo Pellegrini
276 rawfiner
243 Nicolas Auffray
236 José Carlos García Sogo
207 Andreas Schneider
200 EdgarLux
195 Robert Bieber
192 Michel Leblond
183 Richard Levitte
180 Heiko Bauke
172 Edouard Gomez
162 Stefan Schöfegger
155 edgardoh
129 Miloš Komarčević
126 Peter Budai
113 Victor Forsiuk
103 Bill Ferguson
101 Simon Spannagel
93 Jean-Sébastien Pédron
90 Martin Straeten
83 Olivier Tribout
76 Alexandre Prokoudine
73 Mark-64
67 Bruce Guenter
61 Timur Davletshin
56 Sakari Kapanen
55 Matthieu Moy
55 bartokk
50 Rostyslav Pidgornyi
48 Chris Elston
48 Moritz Lipp
48 tatica
44 Dennis Gnad
43 Marco Carrarini
42 Christian Tellefsen
41 Josep V. Moragues
39 Matt Maguire
38 Matthieu Volat
36 Daniel Vogelbacher
36 Jakub Filipowicz
35 Thomas Pryds
32 David-Tillmann Schaefer
32 GrahamByrnes
32 Harold le Clément de Saint-Marcq
31 Marco
30 marcel
29 Maurizio Paglia
28 wpferguson
27 HansBull
27 Kaminsky Andrey
27 Matjaž Jeran
25 mepi0011
25 shlomi braitbart
24 Michal Babej
23 lhietal
22 quovadit
21 Antony Dovgal
21 Jacques Le Clerc
21 Milan Knížek
20 Sam Smith
19 Richard Wonka
19 Ryo Shinozaki
18 Rikard Öxler
18 darkelectron
16 Alexis Mousset
16 Báthory Péter
16 Dimitrios Psychogios
16 José Carlos Casimiro
16 Wolfgang Goetz
15 Guilherme Brondani Torri
15 U-DESKTOP-HQME86J\marco
15 Vasyl Tretiakov
15 Vincent THOMAS
14 Brian Teague
14 Frédéric Grollier
14 luzpaz
13 Kevin Vermassen
13 Marcus Gama
13 Novy Sawai
13 Philipp Lutz
13 Robert Bridge
12 James C. McPherson
12 Victor Lamoine
11 Andrew Toskin
11 Eckhart Pedersen
11 Felipe Contreras
11 Germano Massullo
11 Mikko Ruohola
10 Asma
10 Bernd Steinhauser
10 Kanstantsin Shautsou
10 Martin Burri
10 Serkan ÖNDER
10 Tomasz Golinski
10 Victor Engmark
10 Wyatt Olson
10 junkyardsparkle
10 thisnamewasnottaken
9 Arnaud TANGUY
9 Fabio Heer
9 JohnnyRun
9 Loic Guibert
9 Paolo DePetrillo
9 Žilvinas Žaltiena
8 Benoit Brummer
8 Dušan Kazik
8 Jan Kundrát
8 Jochen Schroeder
8 Matteo Mardegan
8 Petr Styblo
8 Robert William Hutton
8 Roman Khatko
8 Stuart Henderson
8 itinerarium
8 luz paz
8 vertama
8 vrnhgd
7 Ammon Riley
7 Chris Hodapp
7 David Bremner
7 Gaspard Jankowiak
7 Ivan Tarozzi
7 Jim Robinson
7 Marcello Mamino
7 Marcus Rückert
7 Richard Hughes
7 calca
7 elstoc
7 篠崎亮 Ryo Shinozaki
6 Artur de Sousa Rocha
6 Cherrot Luo
6 Christian Himpel
6 Denis Dyakov
6 Dominik Markiewicz
6 Guillaume Benny
6 Harald
6 Jesper Pedersen
6 Maximilian Trescher
6 Petr Stasiak
6 Pierre Lamot
6 Sergey Pavlov
6 Stephan Hoek
6 Wolfgang Mader
6 grand-piano
6 piratenpanda
6 solarer
5 August Schwerdfeger
5 JP Verrue
5 Johanes Schneider
5 K. Adam Christensen
5 Karl Mikaelsson
5 Matthias Gehre
5 Matthias Vogelgesang
5 Simon Legner
5 Tianhao Chai
5 Torsten Bronger
5 matt-maguire