Child pages
  • Tuning the Server

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Especially for SQL statements that are fired often and take up significant time it should be checked if it's possible to optimize the database, for example by creating the relevant indexes. 

Web Client

...

Tuning

...

servoy.webclient.templates.use_local_ids

For the Web Client, Servoy generates HTML markup. In order for Servoy to dynamically update only parts of the UI through Ajax, each object in the HTML Markup receives a unique ID. This ID is also placed in the editable Web Client templates.

Servoy has 2 modes for generating the ID's:

...

The advantage of the local identifiers are that they are shorter in length, thus bring down the weight of the generated HTML markup. The advantage of the unique identifiers is that they are the same on any server where the solution is running.

If templates are used to modify the generated HTML markup for Web Clients, then the unique identifiers are to be used, in order to maintain the link between the identifiers in the edited templates and the identifiers used at runtime. Otherwise the local identifiers can be used.

By default a Servoy Application Server uses the unique identifiers. Enabling the use of local identifiers can be done by setting the servoy.webclient.templates.use_local_ids option on the Servoy Admin page to true (located under Servoy Settings > Web Client settings) 

Content compression

In order to minimize the size of the content that the browser has to download for the Web Client, it's possible to turn on compressionthe application server serving the content can compress the content. The Servoy Application Server is currently not configured to automatically compress the content. 

Compression can be done by the Apache Tomcat instance that is part of the Servoy Application Server, or can be done by an HTTP server that is in front of the Servoy application Server, like an Apache HTTPD Server. 

In order to enable compression in the Tomcat instance that is part of the Servoy Application Server, open the file "server.xml" located in {servoy_install}application_server\server\conf\. and locate the Connector:

Code Block

<Connector port="8080"
  protocol="HTTP/1.1"
  maxThreads="500" connectionTimeout="60000"
  redirectPort="8443" useBodyEncodingForURI="true" />

and add the following atttributes:

  • compressableMimeType="text/html,text/xml,text/css,text/javascript,text/plain" 
  • compression="on"
  • compressionMinSize="2048" 

so the connector is configured like this:

Code Block

<Connector port="8080"
  protocol="HTTP/1.1"
  maxThreads="500" connectionTimeout="60000"
  redirectPort="8443" useBodyEncodingForURI="true"
  compressableMimeType="text/html,text/xml,text/css,text/javascript,text/plain" compression="on"
  compressionMinSize="2048"/>

Save the edits and restart the Servoy Application Server to let the configuration changes take effect.

...

As of Servoy 6.0, the Tomcat compression configuration will be enabled by default

It is also possible to handle the compression outside of the Servoy Application Server, for example in an Apache HTTPD Server placed between the Servoy Application Server and the outside world. The advantage of this is that Tomcat's compression options are limited, so an external HTTP server offers more options.

...

Details on setting up mod_deflate on an Apache HTTPD server can be found here: http://httpd.apache.org/docs/2.0/mod/mod_deflate.html

When compression is handled by outside the Servoy Application Server, it is advised to turn of compression inside Servoy. 

Servoy Application Server log

...