Libraw slowdown when updating 19.2 to 20.2

Hi everyone,

I was using libraw 0.19.2 in my application for reading raw images. Once I decided to upgrade to 0.20.2 version image import obviously slowed down.
I would like to know if there is any specific reason for that, or maybe some new functionality has been added for importing that I miss for new version.

Just to note that in my app, both 19.2 and 20.2 were running the same code. Output data is the same but t_20.2 = t_19.2 * 2.

Please find code example bellow.

	LibRaw proc;
	proc.open_file(fileName);
	proc.unpack();
	/*
 
	...
	setting some parameters here
	... 
 
	*/
	proc.dcraw_process();
	proc.get_mem_image_format(&width, &height, &colorspace, &bps);
	const auto stride = width * (bps / 8) * colors;
	proc.copy_mem_image(outputImage, stride, 0);

Forums: 

It probably makes sense to

It probably makes sense to take more detailed measurements

-- Alex Tutubalin @LibRaw LLC

Thanks for your response,

Thanks for your response,

But I would like to know what you mean with more detailed measurements?

So the behavior is quite ok-ish ? And depends on image 19.2 or 20.2 can win the race?

Thanks in advance.

>what you mean with more

>what you mean with more detailed measurements?

Something like detailed performance profiling (with any avail. tool). The question is: what function is slower in v 0.20 compared to 0.19

-- Alex Tutubalin @LibRaw LLC

proc.dcraw_process(); slowdown on macOs

Hi,

Tried to test the functionality standalone, meanwhile measuring each function run time.

For Windows, the numbers are more or less the same, but for macOS, the same code runs 4 times slower with the 0.20.2 version.

The only function which has a significant time difference is `proc.dcraw_process()`, which as I said is 4 times slower than on the v19.2 version. The problem is reproducible only on macOS.

Any thoughts about this?

Thanks in advance.
Hrach Martirosyan

Tested (w/ full recompile for

Tested (w/ full recompile for both 0.19 and 0.21) and unable to reproduce.

dcraw_process() is only a glue for other functions in processing pipeline, please narrow your search to specific function or code lines.

-- Alex Tutubalin @LibRaw LLC