Tile-images file-formats

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 type

Description

Details

Tile compression type

Description

Details

IMAGEIO

former default

If in doubt, use this, it always works

IMAGEIO_NO_STREAM

same as above but does not use streaming

If you experience problems with Tomcat (IllegalArgumentException in javax.imageio.ImageIO.write)

PNGJ_BEST_COMPRESSION

90% compression level

 

PNGJ_BEST_SPEED

10% compression level

relatively fast but big file-size

WEBP_LOSSY

default, 60% compression quality

fastest and smallest file-size but lossy and relatively high memory consumption

WEBP_LOSSLESS

 

lossless and still small file-size

WEBP_LOSSY_HIGH_QUALITY

78% compression quality

lossy, 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 type

Description

Samples

Response time

Heap

File-size

Tile compression type

Description

Samples

Response time

Heap

File-size

 

 

 

Average
(ms)

Min
(ms)

Max
(ms)

Max
(bytes)

Peak Size
(bytes)

 

Average bytes
(bytes)

IMAGEIO

former default

1000

1324

72

5650

805.306.368

551.550.976

287.472

IMAGEIO_NO_STREAM

same as above but does not use streaming

1000

1633

81

8897

805.306.368

379.584.512

287.472

PNGJ_BEST_COMPRESSION

90% compression level

1000

2587

392

6660

805.306.368

480.247.808

279.347

PNGJ_BEST_SPEED

10% compression level

1000

1215

43

6100

805.306.368

402.653.184

320.218

WEBP_LOSSY

default, 60% compression quality

1000

954

83

20015

805.306.368

805.306.368

121.205

WEBP_LOSSLESS

 

1000

1724

174

6576

805.306.368

460.324.864

156.564

WEBP_LOSSY_HIGH_QUALITY

78% compression quality

1000

1558

278

6498

805.306.368

530.579.456

140.674

 

 

 

less is better

less is better

less is better

less is better

less 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 type

Description

Samples

Response time

Tile compression type

Description

Samples

Response time

 

 

 

Average
(ms)

Min
(ms)

Max
(ms)

IMAGEIO

former default

1000

1825

460

8401

IMAGEIO_NO_STREAM

same as above but does not use streaming

1000

2216

349

24595

PNGJ_BEST_COMPRESSION

90% compression level

1000

3793

524

11092

PNGJ_BEST_SPEED

10% compression level

1000

1634

354

8317

WEBP_LOSSY

default, 60% compression quality

1000

1131

236

11290

WEBP_LOSSLESS

 

1000

2227

501

8749

WEBP_LOSSY_HIGH_QUALITY

78% compression quality

not tested

not tested

not tested

not tested

 

 

 

less is better

less is better

less is better