Opening RAF files is slooooooow

There’s an issue that I can’t quite wrap my head around. In a nutshell, opening any RAF image with any recent version of RT takes about a minute. Pre-processing takes half a minute, and then RT spends another half a minute applying capture sharpening.

I can sort of replicate that with other file types like NEF and CR2 in terms of slow capture sharpening. But def not the demosaicing etc. stage.

RAF file for testing: Terskol, near Mt. Elbrus

I don’t see the same issue in other applications (darktable, Filmulator). DT opens almost instantly, Filmulator takes more time, but well below what RT does. I also know from another person that RT loads my files very fast on his computer. So I’m really at loss here. What could be the reason?

How are you installing? What OS? Have you tried a Dev build?

So, this should not be happening, obviously. And I cannot reproduce on my Windows 5.8 and 5.8-dev builds. If this is on macOS, there might be some unresolved performance issues…

Decade old C2D @2400 opens that picture of your’s in 18-20 seconds. Debian 10, 64 bit, RT’s official Appimage.

I just tried a handfull of RAF files on both 5.8 (appimage) and 5.8 master (self build) and I don’t encounter any speed difference compared to other RAW formats.

I have a few 51 MP RAWs from a GFX 50[R|S] and those take 2 - 3 seconds to load on my box (starting point: emptied my cache directory, and I cleared all edits). “Normal” sized RAFs (+/-24 MP) load within a second. Development does seem to be a tiny bit slower.

My machine isn’t a powerhouse, although I do have a nice graphics card:

  • Processor : AMD Ryzen 5 3600 6-Core Processor
  • Graphics card : GeForce RTX 2060 SUPER 7979 MiB
  • Memory : 32 Gb + 15 Gb Swap
  • OS : Linux (kernel 5.8.10-1)
  • Distro : Debian Buster (rel. 10.7)

EDIT: Just realized that the above doesn’t mean all that much without knowing what is in my auto applied base profile:

On top of a Neutral starting point:

  • RCD+VNG4,
  • Chromatic aberration correction,
  • Capture sharpening,
  • Noise reduction (Chrominance only).

Yeah, sorry.

It’s Ubuntu 20.10 (also seen on earlier releases), and yes, I tried all versions incl. builds from Git.

The laptop has Intel(R) Core™ i5-7200U CPU @ 2.50GHz.

I don’t even mind profiling with gperf if that helps somehow.

Hi @prokoudine
My laptop has similar specs as yours (same i5-7200U CPU, I just upgraded it from 8 to 16GB RAM) and it runs a Manjaro distro. But on my laptop RT is snappy, it loads your provided RAF in less than 5 seconds (from decoding to applying the default profile which has capture sharpening turned on). Same with other RAFs from my own camera (X-T2). So, there’s definitely something going on on your system, but I don’t know what…

Could this be a caching issue.

I’ve seen continuous high loads, impacting overall performance due to this.

While setting up a dual RawTherapee system (development and stable) I somehow temporarily mixed and matched my RT cache directories (never cleaned them before this). After that the stable version saw this high, continuos load. After cleaning out both cache dirs (did this by hand, not the option in the preferences) all was back to normal.

Just in case, on Linux that would be: ~/.cache/RawTherapee

How much memory do you have?

Yeah, I nuked both that and ~/.config/RawTherapee/ to no effect :-/

8GB

@prokoudine

Please post the content of your RT AboutThisBuild.txt

Sure!

Version: 5.8
Branch: releases
Commit: 9a9e0acbf
Commit date: 2020-02-04
Compiler: cc 9.2.1
Processor: x86_64
System: Linux
Bit depth: 64 bits
Gtkmm: V3.24.1
Lensfun: V0.3.2.0
Build type: Debug
Build flags:  -std=c++11  -Werror=unused-label -Werror=delete-incomplete -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -fopenmp -Werror=unknown-pragmas -g -ftree-vectorize
Link flags:   
OpenMP support: ON
MMAP support: ON

Well, that’s why it’s so slow

Edit: for reference the output for a fast build

Build type: Release
Build flags: -Wno-parentheses -std=c++11 -Werror=unused-label -Werror=delete-incomplete -fno-math-errno -Wall -Wuninitialized -Wcast-qual -Wno-deprecated-declarations -Wno-unused-result -Wunused-macros -fopenmp -Werror=unknown-pragmas -O3 -DNDEBUG -ftree-vectorize
3 Likes

Sorry, I’ve just rebuilt without debug support and that fixes it, thanks :slight_smile: I guess I will be of no help if RT crashes one day though :slight_smile:

1 Like

There is a possible middle of the road solution between Debug and Release: relwithdebinfo

This one should give you info when RT comes tumbling down, especially when using it in conjunction with gdb (GNU Debugger).

EDIT: Removed a superfluous word.

Sweet, thanks a lot!

It sounds like debug build was your primary problem, but for others who might encounter issues, I’ve learned the hard way even on a machine with 16GB RAM that starting to work with RT when Chrome has too many tabs open leads to nasty swap thrashing.

Chrome will eat any RAM you give it. :frowning: