Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 307523
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T07:33:59+00:00 2026-05-12T07:33:59+00:00

I’m using mapserver to create a map that will be displayed with the google

  • 0

I’m using mapserver to create a map that will be displayed with the google map api. I’m encountering performances issues.

My maps are all in shapefile format.

I run tests to get time to render maps.

When rendering a map with the shp2img tool, using command line

shp2img -i gif -m C:\myfolder\mymapfile.map -o C:\myfolder\test.gif -all_debug 5 -map_debug 5

I get the following metrics from the log files:

[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

When rendering the same map through mapserver, using

http://localhost/cgi-bin/mapserv.exe?mymapfile.map&layers=&mode=tile&tilemode=gmap&tile=1+1+2

log file is giving this:

[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.

For the same map, the shp2img tool is rendering map 10 times faster than mapserver. When adding more layers and using the tiling mode for google map, can be up to 10 seconds.

Is somebody knows why mapserver is rendering this slow? Is there a workaround?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T07:33:59+00:00Added an answer on May 12, 2026 at 7:33 am

    There are a couple of differences between the shp2img and the mapserv request:

    1) shp2img creates a single image, your mapserv request generates tiles. This means that it might have to render 9 tiles for the samen bounding box instead of 1. This generates overhead. Try rendering without the tiles option set and run your test again.

    2) You have a small overhead for the cgi request in mapserv
    3) Mapserv is pushing the image over http while shp2img is writing directly to disk.
    4) You did not specify the layer in the mapserv request which means that mapserv goes looking for layers.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 209k
  • Answers 210k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Depending on how you launch the second form you can… May 12, 2026 at 9:51 pm
  • Editorial Team
    Editorial Team added an answer I personally would subclass the button. If you create a… May 12, 2026 at 9:51 pm
  • Editorial Team
    Editorial Team added an answer The C runtime interface that Windows exposes to Python uses… May 12, 2026 at 9:51 pm

Related Questions

In order to apply a triggered animation to all ToolTip s in my app,
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a French site that I want to parse, but am running into
I have text I am displaying in SIlverlight that is coming from a CMS

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.