[Qgis-developer] Rendering cache and labeling

Hugo Mercier hugo.mercier at oslandia.com
Fri Dec 19 01:15:06 PST 2014



Le 19/12/2014 09:42, Martin Dobias a écrit :
> 
> On Fri, Dec 19, 2014 at 3:32 PM, Hugo Mercier <hugo.mercier at oslandia.com
> <mailto:hugo.mercier at oslandia.com>> wrote:
> 
> 
>     Suppose I have an uncached layer with labeling switched on.
>     During the first rendering, everything is drawn, including labels.
>     During the second rendering (same extent), the cache could be reused and
>     it would include labels previously drawn during the first rendering.
>     No ?
> 
> 
> No... the labeling is not cached anywhere. Therefore in every rendering
> job it is necessary to register all features that may have labels again
> in order to be considered in the labeling.
> 
> Also think about this case: there is one layer with labeling, it gets
> cached. Then user adds another layer with labels - it is necessary to
> recalculate the labeling again as the new layer may require some
> existing labels to be hidden or moved to a different position to fit
> labels from the new layer. Hopefully that makes sense :-)
> 

Ah right ... now I see.
That is because the cache is local to each layer, but the labeling
depends on all the layers.
Thanks.


More information about the Qgis-developer mailing list