21–27 Sept 2026
EuXFEL Lighthouse
Europe/Berlin timezone

Darfix: How to improve existing code?

22 Sept 2026, 17:18
3m
EuXFEL Lighthouse

EuXFEL Lighthouse

Poster + flash presentation Data Analysis Poster Flash Presentations

Speaker

Maxence Ruyer

Description

Darfix is a GUI software to treat Dark-field X-ray Microscopy (DFXM) data at the ID03 beamline at ESRF.

Since its inception in 2019, Darfix specifications have evolved through successive revisions; a major change was the upgrade of the data acquisition format from EDF to HDF5. As a result, the Darfix codebase began to grow and became overly complex. An incomplete abstraction attempted to handle the two formats, as well as data either fully loaded into RAM or dynamically loaded. This resulted in four distinct use cases and led to an unmanageable amount of conditional code. The first challenge was to reduce this complexity.

On the other hand, as with most ESRF applications, dataset number and size continue to grow each year. Darfix datasets can range from 2 GB to 80 GB and involve computationally expensive operations such as curve fitting across the entire dataset. This led to a second challenge: memory footprint and performance are critical to keeping Darfix attractive for scientists.

How should legacy features be handled? How can one decide whether to refactor, redesign, or remove them?

How can the right balance be achieved between performance, memory usage, and code complexity?

This poster explores these common programming challenges through the case of Darfix software.

Author

Maxence Ruyer

Co-authors

Henri Payno (esrf) Loic Huder (ESRF)

Presentation materials

There are no materials yet.