mapserver를 사용하여 Google지도 API와 함께 표시되는지도를 만듭니다. 공연 관련 문제가 있습니다.MapServer의 성능이 느림
내지도는 모두 shapefile 형식입니다.
지도를 렌더링하는 데 시간이 걸리는 테스트를 실행합니다.
명령 줄을 사용하여 shp2img 도구를 사용하여지도를 렌더링
shp2img -i gif -m C:\myfolder\mymapfile.map -o C:\myfolder\test.gif -all_debug 5 -map_debug 5
나는 로그 파일에서 다음의 측정 값을 얻을 :
[Thu Apr 30 13:50:19 2009].148000 msLoadMap(): 0.000s
[Thu Apr 30 13:50:19 2009].180000 msDrawMap(): Layer 0 (PWorld2), 0.032s
[Thu Apr 30 13:50:19 2009].180000 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Apr 30 13:50:19 2009].180000 msDrawMap() total time: 0.032s
[Thu Apr 30 13:50:19 2009].195000 msSaveImage() total time: 0.015s
[Thu Apr 30 13:50:19 2009].195000 msFreeMap(): freeing map at 01595E18.
[Thu Apr 30 13:50:19 2009].195000 freeLayer(): freeing layer at 0159CD00.
[Thu Apr 30 13:50:19 2009].195000 shp2img total time: 0.047s
를 사용하여 맵 서버를 통해 동일한 맵 렌더링
http://localhost/cgi-bin/mapserv.exe?mymapfile.map&layers=&mode=tile&tilemode=gmap&tile=1+1+2
로그 파일은 다음을 제공합니다.
[Thu Apr 30 13:51:50 2009].664000 CGI Request 1 on process 3520
[Thu Apr 30 13:51:50 2009].664000 msTileSetExtent (-10013744.792915, 8348.961808) (-5009.377085, 10010405.208192)
[Thu Apr 30 13:51:51 2009].23000 msDrawMap(): Layer 0 (PWorld2), 0.359s
[Thu Apr 30 13:51:51 2009].23000 msDrawMap(): Drawing Label Cache, 0.000s
[Thu Apr 30 13:51:51 2009].23000 msDrawMap() total time: 0.359s
[Thu Apr 30 13:51:51 2009].23000 msSaveImage() total time: 0.000s
[Thu Apr 30 13:51:51 2009].23000 mapserv request processing time (loadmap not incl.): 0.359s
[Thu Apr 30 13:51:51 2009].23000 msFreeMap(): freeing map at 01598690.
동일한 맵의 경우 shp2img 도구가 mapserver보다 10 배 빠릅니다. 더 많은 레이어를 추가하고 Google지도 타일링 모드를 사용할 때 최대 10 초가 될 수 있습니다.
지도 서버가 왜 이렇게 느리게 렌더링하는지 다른 사람이 알고 있습니까? 해결 방법이 있습니까?
3) FastCGI를 사용하고 확인하십시오. 큰 차이가 있습니다. http://www.slideshare.net/DonnyV/wms-performance-tests-map-server-vs-geo-server –
다시 1) 위에 인용 된 통계는 1 타일에 대해서만 적용되므로 테스트가 유효합니다 – flurbius