I'm facing a performance issue to load a layer fastly. I'm working with OpenLayers 5.3, GeoServer 2.10 and an Oracle 12 database. I have some (3-4) WMS layers for information and background, and a WFS layer that can be edited. This last one has more than 30000 polylines and is slow to load.
So I was looking for some solutions, and I wanted some advices :
- First, I tried to change my WFS layer in a tiled version, but I was not able to make it work, or samples I found were not enough accurate
- Then, I tried to change my WFS layer in a WMS tiled version. I was able to make it work, but I noticed that the loading of this kind of layer wasn't more fast, and also that the labels are replicated in each generated tile. The solutions I found said that I should use a simple WMS layer to bypass this issue... Well, ok.
- I started some tests with WMTS but realised that my layer will often change, so I can't work with already generated tiles.
Finally, I think that the better way is to work with a simple WMS layer, and switch only needed polylines in features in a WFS layer when I have to edit them. But, I have to filter the data of the WMS layer. I found that it is possible with the CQL filter in the parameters. It works, but the filter is limited in size because of the GET request. So I found sample to change the request in a POST on. It works again, but this time I noticed that the layer generation becomes very slow according of the number of items in my WHERE clause "ID in (1,2,3,4...999,1000,1001...)".
Here is where I am right now, and I was expecting : what is the best approach for my "issue" ?
Right now, I figure out to simplify the CQL filter by adding more columns in the layer to build filters better than a simple "ID in (...)" and continue in this way : replacing my WFS layer with a WMS one and adding some custom code to manage it in the way I want.
If someone has a better proposal for my situation, I'm all ears :-)
Best regards.