QGIS Performance Improvements
Scottish QGIS User Group
March 19th 2014
Martin Dobias
Lutra Consulting
Who are we?
● A group of consulting engineers specialising in:
● GIS (Open Source GIS)
● Software Development
● Numerical ...
About me
● With Lutra Consulting since autumn 2013
● Background in computer science
● Self-taught in GIS
● QGIS developer ...
Performance Problems in QGIS
● DEMO
● Slow rendering
● Every map refresh can take several seconds with complex projects
● ...
Rendering in QGIS (1)
QGIS Performance Improvements
Rendering in QGIS (2)
QGIS Performance Improvements
Parallelization
● Algorithms vary significantly in how parallelizable they are
● Embarrassingly parallel problems
● e.g. r...
Parallel Rendering in QGIS (1)
● Each layer rendered to a separate image, then composed together
● N-times faster!
● Frame...
Parallel Rendering in QGIS (2)
● Real world
● Speed improvement depends on data
● One complex layer may dominate total tim...
User Interface Freeze
● Application waits for events and handles them
● When busy, events need to wait to be processed
● M...
Rendering in Background
● Users may do some changes that affect rendering while rendering is still in progress
● e.g. chan...
Rendering in Background - Problems
● Data used for rendering must be protected from simultaneous access
● Complex task, ne...
DEMO
QGIS Performance Improvements
Project History
● Summer 2010: Started as a Google Summer of Code (GSoC) project
● Spring 2013: Updates to QGIS infrastruc...
Looking into the Future...
● Cancellation of raster data requests (needs also work in GDAL)
● Vector caching
● Faster labe...
Summary
● QGIS 2.4 will be
● More interactive when browsing maps
● Able to use all available CPUs for rendering
● Q & A
QG...
Tips for Better Performance
● Vector layers: use spatial index
● Raster layers: use overviews
● Rendering configuration
● ...
Upcoming SlideShare
Loading in …5
×

QGIS UK: QGIS Performance Enhancements (Lutra Consulting)

2,433 views

Published on

Martin Dobias of Lutra Consulting explaining some of the performance enhancements coming in the next releases of QGIS including multi-threaded processing.

Published in: Software, Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,433
On SlideShare
0
From Embeds
0
Number of Embeds
161
Actions
Shares
0
Downloads
11
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

QGIS UK: QGIS Performance Enhancements (Lutra Consulting)

  1. 1. QGIS Performance Improvements Scottish QGIS User Group March 19th 2014 Martin Dobias Lutra Consulting
  2. 2. Who are we? ● A group of consulting engineers specialising in: ● GIS (Open Source GIS) ● Software Development ● Numerical Modelling (in the water engineering sector) Introduction to Python
  3. 3. About me ● With Lutra Consulting since autumn 2013 ● Background in computer science ● Self-taught in GIS ● QGIS developer since 2005 ● Python support ● Advanced symbology and labeling support ● Expressions ● Under the hood improvements (libraries, vectors, canvas, ...) QGIS Performance Improvements
  4. 4. Performance Problems in QGIS ● DEMO ● Slow rendering ● Every map refresh can take several seconds with complex projects ● Rendering freezes user interface ● User has to wait with any actions until the rendering has finished QGIS Performance Improvements
  5. 5. Rendering in QGIS (1) QGIS Performance Improvements
  6. 6. Rendering in QGIS (2) QGIS Performance Improvements
  7. 7. Parallelization ● Algorithms vary significantly in how parallelizable they are ● Embarrassingly parallel problems ● e.g. rendering of 3D scenes, serving static files from web server ● Inherently serial problems ● e.g. iterative numerical methods QGIS Performance Improvements
  8. 8. Parallel Rendering in QGIS (1) ● Each layer rendered to a separate image, then composed together ● N-times faster! ● Framework to handle scheduling (QtConcurrent) ● Use all available CPU cores ● Automatic load balancing QGIS Performance Improvements
  9. 9. Parallel Rendering in QGIS (2) ● Real world ● Speed improvement depends on data ● One complex layer may dominate total time → smaller speed improvement ● Lower waiting time with remote services → higher speed improvement QGIS Performance Improvements
  10. 10. User Interface Freeze ● Application waits for events and handles them ● When busy, events need to wait to be processed ● Move the rendering to the background! QGIS Performance Improvements
  11. 11. Rendering in Background ● Users may do some changes that affect rendering while rendering is still in progress ● e.g. change layer style, delete a layer ● Possible solutions: ● Do nothing ● Do not allow such actions ● Make sure all such actions are safe QGIS Performance Improvements
  12. 12. Rendering in Background - Problems ● Data used for rendering must be protected from simultaneous access ● Complex task, needs to be addressed rigidly ● Locking ● Waiting ● If not done properly: dead-locks, crashes ● Copying ● May add overhead ● QGIS uses both locking and copying when appropriate QGIS Performance Improvements
  13. 13. DEMO QGIS Performance Improvements
  14. 14. Project History ● Summer 2010: Started as a Google Summer of Code (GSoC) project ● Spring 2013: Updates to QGIS infrastructure before the 2.0 release (API changes) ● Winter 2013: Implementation of the parallel/background rendering ● Spring 2014: Merged into QGIS master branch, will be in 2.4 release QGIS Performance Improvements
  15. 15. Looking into the Future... ● Cancellation of raster data requests (needs also work in GDAL) ● Vector caching ● Faster labeling and vector reprojection ● Rendering with OpenGL QGIS Performance Improvements
  16. 16. Summary ● QGIS 2.4 will be ● More interactive when browsing maps ● Able to use all available CPUs for rendering ● Q & A QGIS Performance Improvements
  17. 17. Tips for Better Performance ● Vector layers: use spatial index ● Raster layers: use overviews ● Rendering configuration ● Turn on render caching ● Turn off anti-aliasing ● Vector styling ● Thin lines ● Polygons without border ● Without data-defined properties ● Data store specific features ● PostGIS – disable SSL mode on local network QGIS Performance Improvements

×