Skip to main content

Technical

Equipment

folder -> equipment -> 

Performance

Plaatjes

Plaatjes staan in Amazon Cloud en zijn 200kb tot 500kb.

No Cache, no optimazation

Het laden van 5 items duurt 1 tot 2.5 seconden afhankelijk van de grootte van de plaatjes.

Async laden plaatjes

Laadtijden per 5 items tussen de 0.6 en 1.2 seconden zijn.  

Plaatjes kleiner maken (optimized for web)

Het laden van 5 items duurt 2 ms.. 200 to 500 maal sneller.

API Call optimization

Scheelt iets, is ongeveer 1.5xc sneller.

Rerender plaatje sop server

Let op dat de GD library op de server actief moet zijn.

Amazon picture load

TLS Handshake and Connection Setup: 100 ms
s3-eu-west-1.amazonaws.com - ping time 27 ms
server processing - 10 ms
Network tranfer speed 0.8 sec/KB

Cache of rentman API

all getc api calls are cached. The cache has a predefiend TTL $cache_ttl = 3600
the raw return value of the API is json encoded written to file.
There is code to delete all the cache (not tested yet)

Images cache

Images are cached as images (binaries) and are re-rendered at a lower resolution.
Images are cached under the name [equipment-id]-[image-modified].jpg
When equipment ids are not valid any more, there could be orphan images in the cache.

When the image is updated for an exisitng equipment id, there will be two files with the same equipment-id,
the one with the lowest image-modified timestamp can be deleted.
There is no code for this yet.

Performance test

    • Orginele laadtijd: 5,4 seconden (1.8 MB plaatjes)
    • Img cache v no cache 2600/3500 ms - 2 ms
    • API call cache  v no cache: 1700 ms - 2 ms
    • na cache plaatjes/ api calls 2 ms