Tile-images file-formats

In jadice web toolkit for displaying documents, the backend renders Tiles as images that can be displayed in the Browser. The details are described in the documentation

This page is intended to give an overview of the different options for generating the Tiles when it comes to file-size, memory consumption and response time.

Overview

Tile compression typeDescriptionDetails
IMAGEIOformer defaultIf in doubt, use this, it always works
IMAGEIO_NO_STREAMsame as above but does not use streamingIf you experience problems with Tomcat (IllegalArgumentException in javax.imageio.ImageIO.write)
PNGJ_BEST_COMPRESSION90% compression level
PNGJ_BEST_SPEED10% compression levelrelatively fast but big file-size
WEBP_LOSSYdefault, 60% compression qualityfastest and smallest file-size but lossy and relatively high memory consumption
WEBP_LOSSLESS
lossless and still small file-size
WEBP_LOSSY_HIGH_QUALITY78% compression qualitylossy, good compromise between file-size, speed and memory consumption



Details

Test setup

  • JMeter 5.3
    • 20 Threads
    • Ramp-up 15s
    • 50 loops
  • Tomcat 9.0.40
  • Java
    openjdk version "11.0.9.1" 2020-11-04
    OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.9.1+1)
    OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.9.1+1, mixed mode)
  • jadice web toolkit 5.10.6.1
  • Docker Image: tomcat:9.0.40-jdk11-adoptopenjdk-hotspot
  • Docker command:
    docker run -p 8080:8080 -p 9010:9010 -m 3072m --cpus=4 jwt-tomcat11
    • 9010 used for JMX monitoring
  • Jadice.properties:
    jadice.viewer.cache.sizeHighwaterMarkPercent=25
    jadice.viewer.cache.maxNumberOfCacheEntries=3000
    jadice.viewer.cache.maximumExpiryObjectCountRatio=10
    jadice.viewer.cache.maxAgeExpiryEnabled=true
    jadice.viewer.cache.maxAge=30
    jadice.viewer.cache.maxAge.timeUnit=MINUTES
  • Tile-Caching disabled

Test 1

Scenario

These results were performed on the same machine so the response time can be considered as "render time" since the transfer doesn't traverse over an actual network

Test result

Tile compression typeDescriptionSamplesResponse timeHeapFile-size



Average
(ms)
Min
(ms)
Max
(ms)
Max
(bytes)

Peak Size
(bytes)


Average bytes
(bytes)
IMAGEIOformer default10001324725650805.306.368551.550.976

287.472
IMAGEIO_NO_STREAMsame as above but does not use streaming10001633818897805.306.368379.584.512

287.472
PNGJ_BEST_COMPRESSION90% compression level100025873926660805.306.368480.247.808

279.347
PNGJ_BEST_SPEED10% compression level10001215436100805.306.368402.653.184

320.218
WEBP_LOSSYdefault, 60% compression quality10009548320015805.306.368805.306.368

121.205
WEBP_LOSSLESS
100017241746576805.306.368460.324.864

156.564
WEBP_LOSSY_HIGH_QUALITY78% compression quality100015582786498805.306.368530.579.456

140.674



less is betterless is betterless is betterless is betterless is better
less is better

Test 2

Scenario

The application was accessed via the internet with the following connection types:

  • Client (JMeter): Fibrechannel 1GBit/s download 1GBit/s upload
  • Host: Coax 1GBit/s download 50MBit/s upload
  • average ping to host: 32ms
  • hops to host: 11

Test result

Tile compression typeDescriptionSamplesResponse time



Average
(ms)
Min
(ms)
Max
(ms)
IMAGEIOformer default100018254608401
IMAGEIO_NO_STREAMsame as above but does not use streaming1000221634924595
PNGJ_BEST_COMPRESSION90% compression level1000379352411092
PNGJ_BEST_SPEED10% compression level100016343548317
WEBP_LOSSYdefault, 60% compression quality1000113123611290
WEBP_LOSSLESS
100022275018749
WEBP_LOSSY_HIGH_QUALITY78% compression qualitynot testednot testednot testednot tested



less is betterless is betterless is better