[Qgis-developer] Benchmarking / optimization

Tim Sutton lists at linfiniti.com
Sun Apr 8 06:08:39 EDT 2012


Hi

Top posting here to pick up the original thread:

Radim you mentioned QPixmap vs QImage. I was looking at why one of the
unit tests is doing wierd rendering today and happened to read this:

"Performance

QPainter is a rich framework that allows developers to do a great
variety of graphical operations, such as gradients, composition modes
and vector graphics. And QPainter can do this across a variety of
different hardware and software stacks. Naturally the underlying
combination of hardware and software has some implications for
performance, and ensuring that every single operation is fast in
combination with all the various combinations of composition modes,
brushes, clipping, transformation, etc, is close to an impossible task
because of the number of permutations. As a compromise we have
selected a subset of the QPainter API and backends, where performance
is guaranteed to be as good as we can sensibly get it for the given
combination of hardware and software.

The backends we focus on as high-performance engines are:

Raster - This backend implements all rendering in pure software and is
always used to render into QImages. For optimal performance only use
the format types QImage::Format_ARGB32_Premultiplied,
QImage::Format_RGB32 or QImage::Format_RGB16. Any other format,
including QImage::Format_ARGB32, has significantly worse performance.
This engine is also used by default on Windows and on QWS. It can be
used as default graphics system on any OS/hardware/software
combination by passing -graphicssystem raster on the command line
OpenGL 2.0 (ES) - This backend is the primary backend for hardware
accelerated graphics. It can be run on desktop machines and embedded
devices supporting the OpenGL 2.0 or OpenGL/ES 2.0 specification. This
includes most graphics chips produced in the last couple of years. The
engine can be enabled by using QPainter onto a QGLWidget or by passing
-graphicssystem opengl on the command line when the underlying system
supports it.
OpenVG - This backend implements the Khronos standard for 2D and
Vector Graphics. It is primarily for embedded devices with hardware
support for OpenVG. The engine can be enabled by passing
-graphicssystem openvg on the command line when the underlying system
supports it."

Currently we are using:

gui/qgsmapcanvasmap.cpp:  mImage = QImage( size, QImage::Format_RGB32 )

Which is good as far as using the Raster backend, but maybe there will
be some performance gain from using opengl where the processing can be
done on the graphics card?

Regards

Tim

On Sun, Apr 8, 2012 at 12:01 PM, Tim Sutton <lists at linfiniti.com> wrote:
> Hi
>
> On Sat, Apr 7, 2012 at 9:08 AM, Paolo Cavallini <cavallini at faunalia.it> wrote:
>> Il 06/04/2012 13:00, Radim Blazek ha scritto:
>>
>>> To get comparable results, the benchmark must be run on a computer
>>> with no or little other load (Linux kernel counts process switching
>>> overhead in process time) and CPU parameters must not change
>>> frequently (all the data collected are relative).
>>>
>>> The requirement would be a dedicated time (1-2h per day should be
>>> sufficient) on a server with 2 CPU/cores (the second for database in
>>> case of db providers).
>>
>> So, it may be better to have a dedicated virtual server for this?
>>
>> BTW: can we have an overview of the "qgis servers"? How many, which
>> services, who is root on which? I think if we need additional resources (as
>> this thread implies), we can plan for a consolidation & upgrade, and search
>> ad hoc funding for this.
>> Thanks.
>>
>
> This is the type of info that needs to go in the QGIS -Governance
> docs. But due to all the consolidation work there is only now:
>
> - qgis.org server hosted by OSGEO
> - android.qgis.org hosting donated by me
>
> Gary and I used to run much of the project infrastructure on our own
> servers but that has pretty much all been rationalised to the servers
> above now. Possibly we could ask OSGEO for another vm if needed. We
> could also build benchmarks on my server, but it wouldnt be a zero
> load environment as Radim suggested.
>
> Regards
>
> Tim
>
>
>>
>> --
>> Paolo Cavallini
>> See: http://www.faunalia.it/pc
>>
>> _______________________________________________
>> Qgis-developer mailing list
>> Qgis-developer at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
> --
> Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
> ==============================================
> Please do not email me off-list with technical
> support questions. Using the lists will gain
> more exposure for your issues and the knowledge
> surrounding your issue will be shared with all.
>
> Visit http://linfiniti.com to find out about:
>  * QGIS programming and support services
>  * Mapserver and PostGIS based hosting plans
>  * FOSS Consulting Services
> Skype: timlinux
> Irc: timlinux on #qgis at freenode.net
> ==============================================



-- 
Tim Sutton - QGIS Project Steering Committee Member (Release  Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.

Visit http://linfiniti.com to find out about:
 * QGIS programming and support services
 * Mapserver and PostGIS based hosting plans
 * FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================


More information about the Qgis-developer mailing list