[mapserver-commits] [MapServer/MapServer] 375a88: WMS: rework building of the layer tree to make it ...

Even Rouault noreply at github.com
Mon Jan 5 06:19:08 PST 2026


  Branch: refs/heads/main
  Home:   https://github.com/MapServer/MapServer
  Commit: 375a88bd7a8292ca0d07cb8bff9183bd6c4b3a4e
      https://github.com/MapServer/MapServer/commit/375a88bd7a8292ca0d07cb8bff9183bd6c4b3a4e
  Author: Even Rouault <even.rouault at spatialys.com>
  Date:   2026-01-05 (Mon, 05 Jan 2026)

  Changed paths:
    M CMakeLists.txt
    M msautotest/misc/expected/runtime_sub_test_caps.xml
    M msautotest/misc/expected/wms_cluster_cap.xml
    M msautotest/misc/expected/wms_cluster_cap_latestversion.xml
    M msautotest/wxs/expected/ows_all_wms_capabilities.xml
    M msautotest/wxs/expected/ows_all_wms_capabilities_post.xml
    M msautotest/wxs/expected/ows_context_caps.xml
    M msautotest/wxs/expected/ows_context_with_layer_list_caps.xml
    M msautotest/wxs/expected/ows_metadata_wms_capabilities111.xml
    M msautotest/wxs/expected/ows_metadata_wms_capabilities130.xml
    M msautotest/wxs/expected/ows_wms_capabilities.xml
    M msautotest/wxs/expected/ows_wms_rootlayer_name_capabilities.xml
    M msautotest/wxs/expected/ows_wms_rootlayer_name_empty_capabilities.xml
    M msautotest/wxs/expected/wms111_test_xml_escaping.xml
    M msautotest/wxs/expected/wms130_test_xml_escaping.xml
    M msautotest/wxs/expected/wms_cap.xml
    M msautotest/wxs/expected/wms_cap100.xml
    M msautotest/wxs/expected/wms_cap110.xml
    M msautotest/wxs/expected/wms_cap130.xml
    M msautotest/wxs/expected/wms_cap130_postgis.xml
    M msautotest/wxs/expected/wms_cap_latestversion.xml
    M msautotest/wxs/expected/wms_cap_latestversion_postgis.xml
    M msautotest/wxs/expected/wms_cap_postgis.xml
    M msautotest/wxs/expected/wms_caps_updatesequence.xml
    M msautotest/wxs/expected/wms_caps_updatesequence_postgis.xml
    M msautotest/wxs/expected/wms_custom_projection_getcapabilities.xml
    M msautotest/wxs/expected/wms_dimension_cap.xml
    M msautotest/wxs/expected/wms_dimension_cap130.xml
    M msautotest/wxs/expected/wms_get_capabilities_tileindexmixedsrs.xml
    M msautotest/wxs/expected/wms_get_caps.xml
    M msautotest/wxs/expected/wms_inspire_cap.xml
    M msautotest/wxs/expected/wms_inspire_cap_111.xml
    M msautotest/wxs/expected/wms_inspire_cap_111_eng.xml
    M msautotest/wxs/expected/wms_inspire_cap_111_ger.xml
    M msautotest/wxs/expected/wms_inspire_cap_eng.xml
    M msautotest/wxs/expected/wms_inspire_cap_ger.xml
    M msautotest/wxs/expected/wms_inspire_scenario1_cap130.xml
    M msautotest/wxs/expected/wms_inspire_scenario1_cap130_eng.xml
    M msautotest/wxs/expected/wms_inspire_scenario1_cap130_ger.xml
    M msautotest/wxs/expected/wms_inspire_scenario2_cap111.xml
    M msautotest/wxs/expected/wms_inspire_scenario2_cap111_eng.xml
    M msautotest/wxs/expected/wms_inspire_scenario2_cap111_ger.xml
    M msautotest/wxs/expected/wms_inspire_scenario2_cap130.xml
    M msautotest/wxs/expected/wms_inspire_scenario2_cap130_eng.xml
    M msautotest/wxs/expected/wms_inspire_scenario2_cap130_ger.xml
    M msautotest/wxs/expected/wms_layer_groups_caps111.xml
    M msautotest/wxs/expected/wms_multiple_metadataurl_cap.xml
    M msautotest/wxs/expected/wms_north_polar_stereo_extent.xml
    M msautotest/wxs/expected/wms_nosld_cap.xml
    M msautotest/wxs/expected/wms_nosld_cap_postgis.xml
    M msautotest/wxs/expected/wms_rast_cap.xml
    M msautotest/wxs/expected/wms_time_cap.xml
    M msautotest/wxs/expected/wms_time_cap130.xml
    M msautotest/wxs/expected/wms_time_cap130_postgis_postgis.xml
    M msautotest/wxs/expected/wms_time_cap_postgis_postgis.xml
    M src/mapfile.c
    R src/mapows.c
    A src/mapows.cpp
    M src/mapows.h
    M src/mapproject.c
    M src/mapproject.h
    M src/mapwms.cpp

  Log Message:
  -----------
  WMS: rework building of the layer tree to make it faster, and understandable! (#7410)

* WMS: rework building of the layer tree to make it faster, and understandable!

Avoid quadratic performance in the number of layers.

On a 103 MB .map file with 6130 layers and 3 level of nesting, WMS
GetCapabilities response generation goes from 56 seconds to 5 seconds.

* msRenameLayer(): avoid potential overflow

* mapows.cpp: minimal conversion to C++

* msOWSMakeAllLayersUnique(): avoid quadratic performance in number of layers

* loadMap(): optimize CRS creation when they are all the same



To unsubscribe from these emails, change your notification settings at https://github.com/MapServer/MapServer/settings/notifications


More information about the MapServer-commits mailing list