Sometimes you may notice that there is high HTTP traffic, and you may determine that it's because the server is attempting to return high volumes of data back to the browser. In this case, if you are running Tomcat, you have the added option of turning on compression at the application server level. Doing so compresses the HTTP responses and can make a big difference in performance, especially with traffic that's text-heavy. Compressed text can go down in size by over 90%, which can make a big difference if your uncompressed data is in the MB's. This is what you need to do.
-
Shut down the Tomcat server.
-
Edit the server.xml file found under Tomcat's conf directory.
-
Add the following attributes to the connector (compression, compressMinSize, noCompressionUserAgents and compressibleMimeType) as in the example below:
<Connector compressibleMimeType ="text/html,text/xml,text/css,text/javascript,application/javascript,application/json" compression="on" compressionMinSize="128" connectionTimeout="20000" noCompressionUserAgents="gozilla, traviata" port="8080" redirectPort="8443" protocol="HTTP/1.1" />
-
Re-start the Tomcat server
Note: compression is not compatible with the useSendFile configuration. For more information, see the Tomcat Documentation.
Other Performance Tips:
Measure and Test
Ad Hoc
- Set query limits on the "Ad Hoc Options" page
- Modify the Ad Hoc caching values if your data does not update constantly
Tomcat
- Increase the maximum thread count at the Tomcat level
- Set up a cache filter for Tomcat or JBoss
- Disable automatic deployment on production servers using Tomcat
Database
- Index columns in the database to speed up domain-based reports
- Set the fetch size in the jasperreports.properties file to modify the number of rows to fetch
JasperReports Configuration Items
- Modify Virtualizer Settings for Very Large Reports
- Modify the jasperreports.properties file to disable multi-line data processing
Recommended Comments
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now