From 2d7b25561ca09602e8e6f1f2b535ea265ad66bf6 Mon Sep 17 00:00:00 2001 From: Bonnasseau Date: Tue, 24 Sep 2013 06:43:20 -0700 Subject: [PATCH] Updated Postgis async (markdown) --- Postgis-async.md | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/Postgis-async.md b/Postgis-async.md index f855456..b2dd497 100644 --- a/Postgis-async.md +++ b/Postgis-async.md @@ -1,4 +1,4 @@ -The PostGIS pluging can be used asynchrnonously since Mapnik 2.3 which can reduce map rendering time if you have several PostGIS layers. +Since Mapnik 2.3 the PostGIS pluging can be used asynchrnonously to reduce the overall map rendering time. ## How it works Mapnik uses the painter's algorithm to render maps. It means that layers are drawn sequentially. The inner algorithmer is : @@ -16,6 +16,7 @@ The asynchronous_request parameter in PostGIS pulgin aims to parallelize querrie Must have : * You have already applyed all the [rendering optimizations with PoistGIS](/wiki:OptimizeRenderingWithPostGIS/) * you have a lot of PostGIS layers + Nice to have : * rendering time for layers are quite homogeneous * your PostGIS database is on another server @@ -23,7 +24,21 @@ Nice to have : ## When not to use it * you use cache-features=false ; if you want to reduce map rendering time, you should not send the same data base query twice if you have enough RAM to store the query restults * you have less thant 3 PostGIS layers -* you have very heterogenous layers : for example, a huge road layers that takes times longer to render than the other layers +* you have very heterogenous layers : for example, a huge road layers that takes 8 times longer to render than the other layers ## How to use it - +### Usage from XML +Set a value to *max_async_connection* and *asynchronous_request* to *true* in your existing PostGIS datasources : + + countries_style_label + + postgis + dbhost + admin + postgres + + world_worldborders + true + 3 + +