When the LuciadLightspeed WMS server receives a map request, it creates and renders an internal view containing the layers with the requested data. Most of the time is spent on drawing the requested layers, so drawing performance is key. Although decoded data itself is cached as much as possible, this cache can be garbage-collected, so decoding performance is also important to obtain a responsive WMS server. When writing custom decoders and/or painters, it is therefore advisable to profile the CPU and memory usage of these components, to detect possible performance bottlenecks.
If there is data that is visualized with an icon painter, point data for instance, it can be useful to check whether the icons are vector-based or image-based. Drawing an icon with the shape draw operations provided by the Java AWT Graphics costs a lot more than painting a BufferedImage that caches the icon’s vector graphic. It is therefore recommended to use image-based icons, especially when a lot of icons must be drawn.
When offering detailed raster or vector data, it can be useful to limit the scales at which the client can request the layers. The use of minimum and maximum scales for layers offered by a WMS server are described in the WMS specification, and can be configured in LuciadLightspeed for each WMS layer. Using multi-leveled datasets that offer images with various levels of detail also addresses this potential performance problem.
The WMS specification defines the optional elements
MaxHeight in the service metadata of the capabilities to restrict the map width and height values that a client is permitted to include
in a request. By default, a LuciadLightspeed WMS server does not impose any map limits. This can be configured programmatically
in ALcdWMSServiceMetaData, or via the default XML configuration format by adding the elements
MaxHeight with a value as content, as child elements to the
Service element in the file
WEB-INF/classes/wms.capabilities.cfg.xml. If clients try to retrieve maps with dimensions that exceed these values, a service exception is automatically sent to the
client, in accordance with the WMS specification.
Most raster implementations in LuciadLightspeed use lazy loading to retrieve pixel data, so efficient raster loading is important to optimize the performance of raster painters. Tiled datasets allow you to decode only that portion of the data that is actually needed: the data that is visible on the map. Multi-leveled datasets offer multiple levels of detail for the same image, which allows to decode the level of detail that best matches the scale of the map. Whether these techniques are used depends on the data format and the structure of the data source.
For more information about optimized raster data formats and how to optimize inefficient data, please refer to the LuciadLightspeed performance guidelines.