CarVac / librtprocess

A project to make RawTherapee's processing algorithms more readily available.
Other
51 stars 23 forks source link

librtprocess build is very slow on Windows #43

Closed heckflosse closed 5 years ago

heckflosse commented 5 years ago

Following the build instructions, the librtprocess build is very slow on Windows

Example for Amaze demosaic of a 100 MP file: 11.8 seconds

With the cmake command from attached patch the same file is amaze demosaiced in 1.5 seconds

diff --git a/README.md b/README.md
index 044dd1a..e7e93da 100644
--- a/README.md
+++ b/README.md
@@ -47,7 +47,7 @@ This is version 0.10.0, which furnishes the following routines:
 Build instructions for Windows msys2 environment:

 1. Make a subdirectory named `build`, and `cd` to that directory.
-2. Run `cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="$MSYSTEM_PREFIX" ..`
+2. Run `cmake -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX="$MSYSTEM_PREFIX" -DCMAKE_BUILD_TYPE="Release" ..`
 3. Run `make`
 4. Run `make install`.

Can someone test if it behaves same on Linux or Mac?

heckflosse commented 5 years ago

ping @CarVac and @Benitoite for Linux and Mac builds

heckflosse commented 5 years ago

@Benitoite I just saw, it's already in the build instructions for Mac...

CarVac commented 5 years ago

This is significantly faster for me.

On my 2700X, 21MP files go from 1.25 to 0.25 for LMMSE and 1.06 to 0.16 seconds for Amaze.

CarVac commented 5 years ago

Actually, when I turned on the release build for Filmulator's CI, it added a new warning that for some reason didn't get caught on my machine.

/home/travis/build/CarVac/filmulator-gui/librtprocess/src/preprocess/CA_correct.cc:975:57: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
                                     for (int cc = 0; cc < std::min(border, cc1 - ccmax); cc++) {
                                                      ~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
heckflosse commented 5 years ago

@CarVac I will have a look at the warning

heckflosse commented 5 years ago

@CarVac Which compiler was that?

CarVac commented 5 years ago

It's gcc 7.

heckflosse commented 5 years ago

No warning using gcc 9.1 here. Maybe 9.1 sees that ccmax < cc1 is checked two lines above and therefore cc1 - ccmax can not overflow. Let's ignore it

CarVac commented 5 years ago

Let's see if I can get a newer version of gcc in Travis.

CarVac commented 5 years ago

I set it to use GCC 9 and it works now.