Pages datool.ru they began to load faster: What have we accelerated
Pages datool.ru they open faster: glued and compressed styles and scripts, light WOFF2 fonts and WebP avatars, pictures via CDN and as you scroll, channel tabs from the cache and in advance, quick calculations in the database.
Pages datool.ru they began to open noticeably faster. We have optimized the site code: styles and scripts are glued and compressed, fonts and channel avatars have become much lighter, pictures go through CDN and are loaded as you scroll, and heavy channel page tabs are taken from the cache and start loading even before clicking. The MAX channel catalog, ratings, "Today in MAX" and the page of any channel now open almost immediately.
Speed is important not only for convenience. A slow page is closed without waiting for data, and search engines take speed into account when ranking. Below we tell you exactly what we have accelerated, with figures where they can be measured honestly.
Fewer files: glued styles and scripts
Previously, the channel page loaded 30 separate style files and 31 scripts, the main one was 14 and 9. Each file was a separate request, and they noticeably slowed down the page display on the mobile Internet.
Now styles and scripts are collected in several common files: the channel page has 3 and 3 of them, the main page has 3 and 2. The appearance has not changed, the order of styles is the same.
- Minification. Comments and extra indents have been removed from the files. Channel page styles began to weigh 36 KB instead of 66 KB, scripts — 28 KB instead of 59 KB. The other pages have similar savings.
- Compression during transmission. Statics is additionally compressed by the brotli algorithm, which is about 15% more economical than the usual gzip.
- Eternal browser cache. In the name of each file there is a fingerprint of its contents. The browser downloads the file once and then takes it from its cache until we release a new version.
Fonts and avatars are much easier
- The PT Sans font in WOFF2 format weighs about 25 KB per font instead of about 120 KB, with all the letters in place. The browser starts downloading the font immediately, even before parsing the styles, and the text appears faster in the desired font.
- Little avatars. In the catalog lists, ratings, "Today in MAX", "MAX Statistics" and channel tabs, the avatar is shown in a small copy: 96 dots and 1-2 KB instead of 320 dots and up to 30 KB. On the "Today" page, the avatars weighed about 0.75 MB, now about 10 times less. The large avatar remained where it is needed: in the header of the channel and on the page of the post.
- WebP format. Avatars and previews of images of posts are stored in WebP and reduced to the size in which the site shows them: the preview of the post is no more than 800 dots on the long side.
Images via CDN and as you scroll
Channel avatars and post images are provided by the content delivery network (CDN), not the site server. CDN stores copies of images closer to the visitor and offloads our server.
Images load as you scroll: the browser doesn't waste time on the ones you haven't scrolled to yet. The exception is what is immediately visible: the avatars of the winners of the "Leaders of the Day", the first catalog cards and the first lines of ratings are loaded immediately so that the top of the page appears in its entirety.
Channel tabs — from the cache and in advance
The channel page is the heaviest on the site: ten tabs, dozens of graphs, calculations for thousands of posts. We accelerated it in a few steps.
- Ready-made tabs in the cache. The calculated tab is stored in a separate page cache: week and month — 10 minutes, quarter — 30 minutes, year and all time — an hour. When the deadline has expired, the visitor immediately sees the last response, and the fresh one is considered in the background. Only the very first visitor of the period has to wait for the calculation.
- Loading before clicking. A tab starts loading when you hover over its button or navigate to it from the keyboard. By the time you click, the response has usually already arrived, and the tab opens without "Downloading...". On the phone, the request goes away when you touch it.
- Ratings, Collections, "Today in MAX" and "MAX Statistics" are calculated in advance, once an hour, so the page only shows the finished result.
The database works faster
Some of the acceleration is not visible from the outside: we rewrote the slowest calculations.
- The results "For all time" used to count up to 53 seconds for channels with hundreds of thousands of posts. Now they are taken from daily statistics and counted in fractions of a second.
- The "release hours month by month" in the "Publication Schedule" tab for the largest channels counted up to 6 seconds when first opened. Now the calculation is based on an hourly summary and takes about 0.05 seconds.
- "Subscriber engagement" for a year is considered one and a half to two times faster for major news channels: posts and attachments are read with one request, not several.
- The search for the text of publications works according to the full—text index, and the search for the channel by name works according to the exact index, so it does not go through the entire table.
We first measure each such acceleration on the largest channels and only then post it.
Who can see it
- For those who watch from the phone: fewer files and lighter images are especially important on the mobile Internet.
- Analysts and advertisers: tabs of major channels for a year and all the time no longer keep you waiting.
- To those who come from the search: the page appears quickly, and search engines see a fast site.
How to check
- Open "Today in MAX": the avatars of the leaders and the results of the day appear immediately.
- Go to the page of a major channel, for example, Krasnodar News.
- Hover the cursor over the "Publication Coverage" tab and click it: the data will open without waiting.
- Scroll through the channel catalog or ratings: avatars are loaded as you scroll.
Frequent questions
Why sometimes the tab still shows "Download..."?
This happens if you were the first to open this channel for a selected period, for example, a year after the cache expired. Then the calculation is going on right now, and the next visitors will receive a ready answer.
Is the data outdated because of the cache?
The tab cache lives from 10 minutes to an hour, depending on the length of the period. For short periods, this is a few minutes, and for a year and all the time, the data for the last hour almost does not change the picture.
Do I need to clear the browser cache after site updates?
No, it's not. Each file has a fingerprint of the content in the name, so after the new version is released, the browser downloads new files itself.
Will the site be even faster?
We continue to measure the slowest pages and tabs and speed them up one at a time, starting with those that are opened most often.
A fast website is about respecting your time. Open the MAX channel directory and see how fast it works now.




