Show HN: A Genetic approach to CSS compression
friggeri.net
friggeri.net
however, although the resulting file size is smaller,
once gzipped it actually leads to larger files than
by only using minification, therefore this is a
totally useless article,
no, it's not. mobile devices have a relatively small cache size, and assets are cached in non-gzip-ed form. so non-gezip-ed filesize is important (on mobile, that is)I'd be very happy to see lots more of these interesting experiments - regardless of outcome.
The disadvantage of genetic algorithms is that they are heuristics, with no guarantees on the quality of the solution found. Exact solvers such as the ones above do provide an estimate of how far you are from the optimal solution if you decide to stop them before they terminate.
If one could get a pretty good compression in around 200-500 generations, then perhaps it would be a good solution.
The big speed bottleneck when serving pages is the network so the smaller the file you send across the wire the faster your page will load.
This goes for all the text mime-types: html, xml, css, javascript, text.