PHP7 and lazy image loader – Development iteration # 92




Our developers have completed the development of iteration # 92. In this iteration, we worked on a lazy loader for images and the latest web servers were switched to PHP7.


In recent months we have worked to make it fit our codebase for the latest version of php. One of the main improvements in PHP7 the new php-ng engine, which promises double the performance. Meanwhile, all servers have been upgraded to PHP7. The difference in performance and the time of upgrade are clearly visible in the chart below of the average application response time per server. The green line is a server that was upgraded during the measurement to PHP7 and since then performs a lot better. The difference is not quite a halving in the response, but that is because the application response time includes the wait is displayed on data from caches and databases.

Tweakers application response PHP7 vs php5.6

Lazy image loader

To improve page load times and reduce data usage, we have created an implementation of a lazy image loader. Images in single-page reviews and forum topics are now retrieved via the new image loader. The lazy image loader ensures that images on these pages are only loaded when they (almost) come in sight of the user. Never viewed images are not retrieved. Especially in big picture topics that cares tremendously in data usage. His images down the page faster visible if you immediately after you open the page, scroll down, because the browser will not also want to load all parent images. An example of a page where you can see the lazy image loader in operation, the topic of aircraft photography .

And then we have …

working on a solution for proper display of images that are tilted via EXIF ​​orientation;
adjustments were made in order to make it suitable for the code Symfony 3;
Fixed a bug that resulted in code-highlighting did not work in blogs tweak.


In: A Technology & Gadgets Asked By: [21995 Red Star Level]

Answer this Question

You must be Logged In to post an Answer.

Not a member yet? Sign Up Now »