On Tue, Dec 31, 2013 at 7:20 PM, Jonathan Moules <
[email protected]> wrote:
> Hi List,
> While optimisations are on our minds (who needs holidays anyway?), I
> thought I'd bring up a function that seems to be particularly slow. Namely
> the "isometric" one.
>
> Same parameters as before (single test instance, 1 thread, coming from
> Oracle).
> I'm getting GeoServer to render this png:
> http://maps.warwickshire.gov.uk/misc/with-isometric.png
>
Hmm... does not respond (at least to me).
>
>
> There are about 9000 buildings on there.
>
> My response times for this layer using jmeter average 8500ms! Now, much of
> that is Oracle (booo!), however I've noticed that it seems to take
> considerably longer when I'm using the "isometric" function than some of my
> other stylings that don't use that.
>
> If I disable just the isometric effect (so comment out the below; the
> features are still rendering, but just without going through the isometric
> function):
>
> <se:Geometry>
>> <ogc:Function name="isometric">
>> <ogc:PropertyName>SDO_GEOMETRY</ogc:PropertyName>
>> <ogc:Literal>2</ogc:Literal>
>> </ogc:Function>
>> </se:Geometry>
>
>
> My request time drops to 7300ms - a significant saving.
> (Optimisation for me - The output is almost identical at that scale -
> http://maps.warwickshire.gov.uk/misc/without-isometric.png - so I'll turn
> it off at that scale in the future.)
>
Hmm... one consideration here. The isometric function creates the illusion
of a 3d building by using
a isometric extrusion of it. See a result here:
http://mapping-malaysia.blogspot.it/2010/07/pseudo-3d-buildings-in-geoserver.html
Now, to do that, each segment is turned into a rhombus representing the
projection of that side.
In other word, each vertex in the original geometry is replaced by 4 new
vectices (as we have to create
one rhombus for the segment at the left, and one at the right).
So, the painting effort becomes 4 times bigger, in term of vertices, and
each rhombus needs to be both
stroked and filled, moreover, to get a good effect, you have to use
translucent filling, which is also
quite expensive.
The source code of the isometric function is here, not sure there is much
to be optimized
(yes, there are micro optimizations that could be done here and there,
doubt very much they would result in any significant speedup):
https://github.com/geotools/geotools/blob/master/modules/library/main/src/main/java/org/geotools/filter/function/FilterFunction_isometric.java
Long story short, the overhead you're seeing does not seem to be that much
considering the extra effort
required to perform the extrusions and paint them. I'd suggest to enable
this style only
when you're fairly zoomed in. If you want to have a nice effect for the
other zoom levels you could
consider using the offset function and drop shadows instead?
http://docs.geoserver.org/stable/en/user/styling/sld-extensions/geometry-transformations.html#drop-shadow
Cheers
Andrea
--
*== GeoSolutions will be closed for seasonal holidays from 23/12/2013 to
06/01/2014 ==*
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel