[Interest] QSharedMemory example has excessive copies?

Thiago Macieira thiago.macieira at intel.com
Fri Sep 2 08:56:43 CEST 2016


Em quinta-feira, 1 de setembro de 2016, às 23:42:59 CEST, Joshua Grauman 
escreveu:
> It looks to me like the process that loads the image from the file into 
> shared memory has 3 deep copies. Maybe implicit sharing reduces that, I'm 
> not sure. But on the surface, it looks like 1) the file is loaded into a 
> QImage using image.load(fileName). Then 2) the QImage is streamed into a 
> QBuffer using out << image; And finally, 3) the buffer is memcopied into 
> shared memory.

Aside from the last memcopy, the other operations actually convert the data 
into different formats.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Interest mailing list