BlogoText / blogotext

A little more than a lightweight SQLite Blog-Engine.
Other
136 stars 30 forks source link

GZIP et minify (css, js, html) #374

Open B4rb3rouss opened 6 years ago

B4rb3rouss commented 6 years ago

Juste pour ne pas oublier, je pose ça là :

Toujours dans un but d'améliorer les performances d'un Blogotext auto-hébergé.

ragnar76 commented 6 years ago

just my 2 cents...

compressing and/or caching should be a job of the webserver (for example, apaches mod_deflate and mod_cache) . Sure, it a hell of config but after it, it's blazing fast and there is no need to minify the files at all. But if you still want to have a look at googles mod_pagespeed

remrem commented 6 years ago

@ragnar76, there are several use cases where cache management and compression by the web server (apache/nginx...) is not the "optimal" solution.

Since BT 3.7, I see some points that can cause problems :

There are still a few other cases that I do not mention.

For information, on my working version (3.8), I finished the cache/versionning/compression/minify system for CSS /JS / SVG (admin side), as soon as I have some time I will make a comparison, and I will put you the results, but without having looked in details, the working version is more powerful than the 3.7.6 (for now).

In any case, when BT 3.8 will be in test/freeze, we can always decide to remove this feature if it is problematic or not really necessary.

remrem commented 6 years ago

Small benchmark, to take into consideration:

The test protocol is not the best and not very reliable, I consider it more as an indicator than as a reliable measure.

1 First, a baseline: All systems disabled (no minify/compression (BT or apache)...)

2 BT systems disabled, apache deflate enabled

3 BT systems disabled (except gzip), apache deflate disabled, GZIP by php (BT)

4 BT systems all active, apache deflate disabled

5 BT systems all active, apache deflate activated

Voilà, as I said at the beginning, I wait to see what it will look like during the freeze, when everything will be pretty much operational to see the impact on the client and server sides...