Why we pass 50 limitations in these file in open layers / GeoServer?

67 Views Asked by At

Please let us know what is use of below code and why we are passing the PARTIAL_BUFFER_STRATEGY_SIZE as 50 by default ?

<context-param>
    <!-- see comments on the PARTIAL-BUFFER strategy -->
    <!-- this sets the size of the buffer.  default is "50" = 50kb -->

    <param-name>PARTIAL_BUFFER_STRATEGY_SIZE</param-name>
    <param-value>50</param-value>
  </context-param>

If we will change the PARTIAL_BUFFER_STRATEGY_SIZE value then what will effect on the application?

2

There are 2 best solutions below

1
jnewmoyer On

If you look higher up in the web.xml the serviceStrategy comments explain what this is used for. https://github.com/gem/oq-ui-geoserver/blob/master/geoserver/WEB-INF/web.xml#L10

4
Ian Turton On

As the GeoServer manual explains there are several possible strategies:

SPEED

Serves output right away. This is the fastest strategy, but proper OGC errors are usually omitted.

BUFFER

Stores the whole result in memory, and then serves it after the output is complete. This ensures proper OGC error reporting, but delays the response quite a bit and can exhaust memory if the response is large.

FILE

Similar to BUFFER, but stores the whole result in a file instead of in memory. Slower than BUFFER, but ensures there won’t be memory issues.

PARTIAL-BUFFER

A balance between BUFFER and SPEED, this strategy tries to buffer in memory a few KB of response, then serves the full output.

Then as the comment you show says if you choose PARTIAL-BUFFER you can set what size that buffer is, in this case 50kB.