Posts tagged ‘performance’
With Google’s recent open-sourcing of Brotli following on the heels of Apple’s announcement of LZFSE, it’s an exciting time in the lossless compression world, as new compression schemes tuned for specific use cases now appear to offer substantial enough benefits to challenge the venerable ZIP/Deflate as the Internet’s transport compression algorithm of choice.
Of course, Deflate and its most widespread implementation, zlib, aren’t dead yet, not by a long shot. But what these new LZ77 algorithms offer is significant enough performance gains to justify widespread implementation, and adoption by the W3C. And they have the backing of companies such as Google and Apple, which means they’ll ship on tens of millions of devices and browser installs. more …
The GA insertion code that Google gives you to put on your site does a couple of bad things: First, it uses
document.write, and second, it loads
ga.js directly, which blocks browsers from doing any page rendering or downloading of other page components (images, scripts, stylesheets) during the whole time it takes
ga.js to download and execute. In other words, Google Analytics makes your pages load slower!
Using Steve’s best practices, I’ve coded up a better version that does DOM insertion of the script tag and uses the “script onload” technique to initialize the tracker, so that it doesn’t block I/O, and you can inline it anywhere on the page or even load it from an external file. You can choose to lazy-load GA whenever you want — for instance, even after
window.onload fires — so that it’s totally asynchronous and doesn’t interfere with page rendering at all. more …
Here’s something useful for the web developers out there. It’s a script I’ve been using for a while that makes it super-easy to losslessly compress entire folders of PNG and JPEG files for the web.
If you’re familiar with PNG optimization, then you know about programs like advpng, optipng and pngout that optimize and recompress PNG files, making them much smaller than the likes of Photoshop can. My shell script combines all three of these utilities to achieve minimum file size, while hiding their command-line syntax and adding the ability to recursively process entire directory trees.
And, it works with JPEGs, too! It uses
jpegtran (included with libjpeg) and another small utility I’ve included to optimize and strip all metadata from JPEG files. Since my script searches directories recursively, all you need to do is type, say,
imgopt myproj/htdocs and it’ll take care of your entire website.
All compression is lossless, which means no pixels are changed and no information is lost, the files just get smaller — chances are your layout can shrink by as much as 50%, which is like getting free bandwidth, and it means your site will snap into place that much faster for users. more …
No big news here, but I’ve got an updated patch if you want to use my mod to add Minify to WordPress and WP Super Cache. For more information, check out my original explanation and instructions post, which I’ve updated with links to the new files. more …