I make calls to WMS layers from a remote server, these layers are large (between 150 MB and 1 Gb), the problem is when I want to display them, it takes time to recover them and display them on the map, and usually larger layers that appear faster than others.
And after every call of a WMS layer, the CPU increases to 100% which poses a problem on the server
Is there a way to optimize the response time of these layers the problem with CPU ? (On Postgresql or Javascript).
And does putting all the layers in a single directory can optimize the response time ? for example: WMS1: layers1, layers2 ... instead of WMS1: layers1, WMS2: layers2
I found some recommendations :
Make sure basemap and operational layers are in the same projection/coordinate system.
Make sure large datasets are scaled to not render at all zoom levels (this is defined in the layer/WMS sld file).
Creating tiles from WMS's.
Make sure your client viewer is referencing the GeoWebCache tiles (url example of cached layers http://serverName.xyz.com:80/geoserver/gwc/service/wms?tiled=true).