On Wed, Jul 6, 2011 at 9:51 AM, LSA <[email protected]> wrote:
> Hi,
>
> What are best practices to maximize geotools rendering performance?
>
> Layer contains 25000 features
>
> With simple style - rendering tooks <0.5 sec.
>
> With style like:
> [[ Line_ID >= 2.0 ] AND [ Line_ID < 11.2 ]] -> draw with color1
> [[ Line_ID >= 11.2 ] AND [ Line_ID < 20.4 ]] -> draw with color2
> [[ Line_ID >= 20.4 ] AND [ Line_ID < 29.6 ]] -> draw with color3
> [[ Line_ID >= 29.6 ] AND [ Line_ID < 38.8 ]] -> draw with color4
> [[ Line_ID >= 38.8 ] AND [ Line_ID < 47.9 ]] -> draw with color5
> [[ Line_ID >= 47.9 ] AND [ Line_ID < 57.1 ]] -> draw with color6
> [[ Line_ID >= 57.1 ] AND [ Line_ID < 66.3 ]] -> draw with color7
> [[ Line_ID >= 66.3 ] AND [ Line_ID < 75.5 ]] -> draw with color8
> [[ Line_ID >= 75.5 ] AND [ Line_ID < 84.7 ]] -> draw with color9
> [[ Line_ID >= 84.7 ] AND [ Line_ID < 93.9 ]] -> draw with color10
> [[ Line_ID >= 93.9 ] AND [ Line_ID < 103.1 ]] -> draw with color11
> [[ Line_ID >= 103.1 ] AND [ Line_ID < 112.3 ]] -> draw with color12
> [[ Line_ID >= 112.3 ] AND [ Line_ID < 121.5 ]] -> draw with color13
> [[ Line_ID >= 121.5 ] AND [ Line_ID < 130.7 ]] -> draw with color14
> [[ Line_ID >= 130.7 ] AND [ Line_ID < 139.9 ]] -> draw with color15
> [[ Line_ID >= 139.9 ] AND [ Line_ID < 149.1 ]] -> draw with color16
> [[ Line_ID >= 149.1 ] AND [ Line_ID < 158.3 ]] -> draw with color17
> [[ Line_ID >= 158.3 ] AND [ Line_ID < 167.5 ]] -> draw with color18
> [[ Line_ID >= 167.5 ] AND [ Line_ID < 176.7 ]] -> draw with color19
> [[ Line_ID >= 176.7 ] AND [ Line_ID <= 185.0 ]] -> draw with color20
>
> its performance really poor - it tooks 3 sec to render (which about six
> time slower).

Today I've opimized a filter function, Recode, used for a similar case and
got a very good speedup:
http://geo-solutions.blogspot.com/2011/07/developer-corner-taming-massive-style.html

I think it's possible to do the same for the Categorize function, which is
the one that you need for the case above.
See the devel mailing list, there is a thread about Recode that explains the
approach I used

Cheers
Andrea

-- 
-------------------------------------------------------
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:      +39 0584 962313

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

-------------------------------------------------------

------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to