[Mapserver-users] Slow Mapserver SVG on postgres db

yuth hor mofumyke at yahoo.com
Tue Mar 2 00:59:51 PST 2004


--0-535643834-1078217991=:36027
Content-Type: text/plain; charset=us-ascii


Hi all,

 

Again, I need some guidance about the SVG output. I have tested the new SVG output from nightly build and found that the return SVG map was very slow if I use the Postgres db as an input type. The shape file input gives me a better performance in order to generate the SVG map. It has no problem and quite fast if I use postgres/postgis with raster output. Do you have any idea about this?  I have never look into the Mapserver source before, anyone can tell me about the SVG generated process in Mapserver and which module in Mapserver source that use to draw the SVG map? I may take a look that source for better understanding.

 

Some information about my data

-        the layer is quite large, about 10 – 65 Mb. / layer (shp file)

-        After dump the shp layer into Postgres, GIST index was already made.

 

Thank you very much in advanced, I also enclosed my map file with this mail for your perusal.

 

Teerayut  

 

MAP

  NAME 'japan'

 

 

  EXTENT 122.935414 24.040589 153.986285 45.554518

 

  STATUS OFF # we don't want a raster map

  UNITS DD

  SHAPEPATH "/usr/local/apache/htdocs/japan/data/"

 

  WEB

    HEADER '../header.svg'

    FOOTER '../footer.svg'

    QUERYFORMAT 'image/svg+xml'

  END

 

 

 

LAYER

  CONNECTIONTYPE postgis

  NAME "z9_road"

  STATUS DEFAULT

  CONNECTION "user=postgres dbname=gsi2500 host=10.10.10.100 port=5432"

  DATA "the_geom from (select gid,the_geom from z9_road) as foo using unique gid using SRID=4301"

  TYPE QUERY

  HEADER ../z9_road_header.svg

  FOOTER ../z9_road_footer.svg

  TEMPLATE ../z9_road_template.svg

END

 

END

 



---------------------------------
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster.
--0-535643834-1078217991=:36027
Content-Type: text/html; charset=us-ascii

<DIV>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>Hi all,</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3></FONT></SPAN> </P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>Again, I need some guidance about the SVG output. I have tested the new SVG output from nightly build and found that the return SVG map was very slow if I use the Postgres db as an input type. The shape file input gives me a better performance in order to generate the SVG map. It has no problem and quite fast if I use postgres/postgis with raster output. Do you have any idea about this? <SPAN style="mso-spacerun: yes"> </SPAN>I have never look into the Mapserver source before, anyone can tell me about the SVG generated process in Mapserver and which module in Mapserver source that use to draw the SVG map? I may take a look that source for better understanding.</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>Some information about my data</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt 60pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 60.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: Century; mso-bidi-font-family: Century"><SPAN style="mso-list: Ignore"><FONT face=Century size=3>-</FONT><SPAN style="FONT: 7pt 'Times New Roman'">        </SPAN></SPAN></SPAN><SPAN lang=EN-US><FONT face=Century size=3>the layer is quite large, about 10 – 65 Mb. / layer (shp file)</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt 60pt; TEXT-INDENT: -18pt; mso-list: l0 level1 lfo1; tab-stops: list 60.0pt"><SPAN lang=EN-US style="mso-fareast-font-family: Century; mso-bidi-font-family: Century"><SPAN style="mso-list: Ignore"><FONT face=Century size=3>-</FONT><SPAN style="FONT: 7pt 'Times New Roman'">        </SPAN></SPAN></SPAN><SPAN lang=EN-US><FONT face=Century size=3>After dump the shp layer into Postgres, GIST index was already made.</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT face=Century size=3>Thank you very much in advanced, I also enclosed my map file with this mail for your perusal.</FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century>Teerayut <SPAN style="mso-spacerun: yes"> </SPAN></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century>MAP<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>NAME 'japan'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>EXTENT 122.935414 24.040589 153.986285 45.554518<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>STATUS OFF # we don't want a raster map<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>UNITS DD<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>SHAPEPATH "/usr/local/apache/htdocs/japan/data/"<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>WEB<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>HEADER '../header.svg'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>FOOTER '../footer.svg'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">    </SPAN>QUERYFORMAT 'image/svg+xml'<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>END<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century>LAYER<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>CONNECTIONTYPE postgis<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>NAME "z9_road"<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>STATUS DEFAULT<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>CONNECTION "user=postgres dbname=gsi2500 host=10.10.10.100 port=5432"<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>DATA "the_geom from (select gid,the_geom from z9_road) as foo using unique gid using SRID=4301"<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>TYPE QUERY<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>HEADER ../z9_road_header.svg<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>FOOTER ../z9_road_footer.svg<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century><SPAN style="mso-spacerun: yes">  </SPAN>TEMPLATE ../z9_road_template.svg<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century>END<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><FONT size=3><FONT face=Century>END<o:p></o:p></FONT></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0mm 0mm 0pt"><SPAN lang=EN-US><o:p><FONT face=Century size=3> </FONT></o:p></SPAN></P></DIV><p><hr SIZE=1>
Do you Yahoo!?<br>
Yahoo! Search - <a href="http://search.yahoo.com/?fr=ad-mailsig-home">Find what you’re looking for faster.</a>
--0-535643834-1078217991=:36027--



More information about the MapServer-users mailing list