[mapserver-users] Getcapabilities extremely slow in version 6.4.1

aabhayas A.Abhayasinghe at bom.gov.au
Sun Mar 1 19:40:39 PST 2015


After profiling version 6.0.4 and 6.2.2 MapServer we were able to isolate the
issue. It seems that the issues is related to  “OWS_LAYER_GROUP” under
LAYER>METADATA in our map files.

When “OWS_LAYER_GROUP” is not used in the map file, GetCapabilities request
on version 6.2.2 is significantly faster (was comparable with the timing on
version 6.0.2)

Profiling showed us that version 6.2.2 is taking significantly more time on
“msWMSPrepareNestedGroups” function in mapwms.c file. Especially
“strcasecmp” function in side “msWMSPrepareNestedGroups” is taking
significant time.

When we compare the source of mapwms.c, we noticed that there are some
additional processing happening in the “else” block “ /* split into
subgroups. Start at address + 1 because the first '/' would cause an extra
empty group */” .
“else” block in Version 6.0.4 looks like following ( line 1900 in mapwms.c)

//////////////////////////
else
        {
          /* split into subgroups. Start at adres + 1 because the first '/'
would cause an extra emtpy group */
          nestedGroups[i] = msStringSplit(groups + 1, '/',
&numNestedGroups[i]);
        }

////////////////////////////

But the “else” block in version 6.2.2 looks like following with the
additional processing ( line 371 in mapwms.c)

/////////////////////////////////////////////////////
else {
          /* split into subgroups. Start at address + 1 because the first
'/' would cause an extra empty group */
          nestedGroups[i] = msStringSplit(groups + 1, '/',
&numNestedGroups[i]);
          /* */
          for (j = 0; j < map->numlayers; j++) {
            if (isUsedInNestedGroup[j])
              continue;

            for (k=0; k<numNestedGroups[i]; k++) {
              if ( GET_LAYER(map, j)->name && strcasecmp(GET_LAYER(map,
j)->name, nestedGroups[i][k]) == 0 ) {
                isUsedInNestedGroup[j] = 1;
                break;
              }
            }
          }
//////////////////////////////////////////////////////




--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Getcapabilities-extremely-slow-in-version-6-4-1-tp5189325p5190810.html
Sent from the Mapserver - User mailing list archive at Nabble.com.


More information about the mapserver-users mailing list