[Community] Re: PrimaGIS 0.6-pre Performance

Ludwig Max Brinckmann ludwigbrinckmann at gmail.com
Sun Jul 16 23:32:37 EEST 2006


Just some more logging data. I just moved the computation of the individual
parameters into separate calls, timing them, they are all ok:

This is what the code looks like now in PrimagisMap.py view()

            log("getting active Layers")
            layers = mapsession.getActiveLayers()
            log("getting mapSize")
            size = mapsession.getSize()
            log("getting View")
            bbox = mapsession.getView().totuple()
            log("getting SRS")
            srs = self.getSpatialReferenceCode()
            log("getting mapunits")
            units = self.getMapUnits()
            log("getting outpuformat")
            format = self.getOutputFormat()
            log("getting backgroundcol")
            bgcolor = self.getBackgroundColor() or '#ffffff'

            log("Starting rendering")
            # Render the map image
            maprenderer = self.getMapRenderer()
            image = maprenderer.render(layers = layers,
                                       size = size,
                                       bbox = bbox,
                                       srs = srs,
                                       units = units,
                                       format = format,
                                       bgcolor = bgcolor,
                                       transparent = not(
self.getBackgroundColor()))
            log("Finished rendering")

These are timings for it: so all the parameters are gathered
instantaneously, but the maprenderer than takes 36 seconds to render a
simple line data (this time watersheds) from a local shapefile.

2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
372
getting active Layers
------
2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
374
getting mapSize
------
2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
376
getting View
------
2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
378
getting SRS
------
2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
380
getting mapunits
------
2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
382
getting outpuformat
------
2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
384
getting backgroundcol
------
2006-07-16T22:26:24 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
387
Starting rendering
------
2006-07-16T22:27:01 INFO PrimaGIS
/var/opt/zope/nextgeneration/Products/PrimaGIS/PrimaGISMap.py::view(), line
398
Finished rendering
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gispython.org/pipermail/community/attachments/20060716/4d7e14c6/attachment.htm>


More information about the Community mailing list