RESEARCH 》 Building my own CDN - Minify Script files - Update: 23-July-2016

One of the suggestions Google PageSpeed Insights tool suggested for The TOFFEE Project website is to minify the css and java script files (as discussed in my earlier update on 22-July-2016. You can read the same HERE).

Minify Script files: When you read online about minification of your web script files, often they highlight file size savings and thus resulting faster download time and better website performance. This is true to an extent. But these days we get faster networks and the websites are already getting bulky loaded with lots of image files. So saving few kilobytes by minification of these script files sometimes hardly matter. But being myself a systems architect I can see there are other advantages in a systems point of view.

Assume users are accessing your website(s) via Mobile devices and mini-PC hardware platforms. In these cases the CPU and memory resources in these devices are limited. In that case the scripting language interpreters such as Javascript/CSS/HTML (existing within your browsers) will have less preprocessing work to do if the script files are minified. When these interpreters parse a text based script file it needs to skip comments and various white spaces. This causes unwanted CPU overhead. So minified script files are lot more interpreter parser optimized. In other words, if you minify php files, you server (such as your Apache web-server in your hosting site) processing overhead will reduce, if you minify Javascripts, CSS, HTML your client (Browser) processing overhead will reduce.

In the case of C/C++ programs, programmers compile and generate machine readable binary output in offline. This is a passive operation where a developer builds and publishes/releases his compiled binaries. But in the case of script files, the interpreters have to parse these files in real-time and this is a CPU bound operation in real-time. And hence it makes sense to minify the script files.

Here is my Joomla protostar template main css file. As you can see below this is neatly formatted and human readable. But for the reasons discussed above, this needs minification.
joomla original protostar_css template file

To minify the same, I can use various online tools. But there is a risk in using the same sometimes. Since there are various levels of minification one can do. Such as removal of comments, removal of white spaces and as well refinements in code so that it can produce the same browsing experience. Since this file is a very large file I decided to manually minify the same. And I am afraid using online tools as they may introduce any bugs into the same.

So I started manually minify the same in various stages. I can maintain several snapshots (versions of the script file) so that if something goes wrong I can safely roll back to a previous version which is working flawless.
joomla minify protostar_css template file

And here is the screenshot of the original Joomla protostar template css file which is around 7500 lines.
joomla original protostar_css template file number of lines

So I am sure minification of these script files will boost my run-time website performance. As I explained before I am not bothered about the file download time, but instead I want to optimize its real-time rendering performance in a browser. This is my next yet another baby step towards building my own private CDN Network.

Here is my live video log of the same:

Suggested Topics:

Generic CDN

Building my own CDN

💎 TOFFEE-MOCHA new bootable ISO: Download
💎 TOFFEE Data-Center Big picture and Overview: Download PDF


MySQL Database Network Data - WAN Acceleration ↗
Saturday' 13-Mar-2021
Here is a quick demo of TOFFEE WAN Optimization optimizing MySQL Data transfers of a MySQL Client to Server Remote Access.

Optimization of network data (WAN Optimization) at various levels ↗
Saturday' 13-Mar-2021
WAN Network data can be optimized at various levels depending upon the network applications, protocols, topology and use-cases. So the amount of data you can optimize will depend on the strategy you choose to optimize. Such as: Network Packet level optimization, Session level optimization, File level optimization, etc.

Internet optimization through TOFFEE-DataCenter WAN Optimization Demo ↗
Saturday' 13-Mar-2021

TOFFEE-Mocha WAN Emulation software development - Update: 15-July-2016 ↗
Saturday' 13-Mar-2021
Today I completed doing all the changes which are meant for the new upcoming TOFFEE-Mocha release. I have increased the resolution and the range of all factor variables. Instead 1 to 10 range now they have a range of 1 to 30. Unlike before the value 1 means it is lot more intense (or in some cases less intense) and the uppermost value 30 means lot less intense (or in some cases lot intense).

TOFFEE-DataCenter with GlusterFS Storage Cluster ↗
Saturday' 13-Mar-2021

TOFFEE-Mocha Documentation :: TOFFEE-Mocha-1.0.32-1-x86_64 and TOFFEE-Mocha-1.0.32-1-i386 ↗
Saturday' 13-Mar-2021

Power consumption of my Home Lab devices for research ↗
Saturday' 13-Mar-2021
Here is my power-consumption measurements of various devices deployed within my home lab. I measured via my kill-a-watt sort of power-meter which is fairly reliable and accurate. I checked its accuracy with various standard load such as Philips LED laps and other constant power-consuming devices to make sure that the power-meter is precise.

Network Latency and Bandwidth Assessment - for Network Admins and Infrastructure Architects ↗
Saturday' 13-Mar-2021

TOFFEE-Mocha WAN emulator Lab deployment and topology guide ↗
Saturday' 13-Mar-2021

TOFFEE-DataCenter :: Optimized ISP backbone networks for countries with slowest Internet Speed ↗
Saturday' 13-Mar-2021

Featured Educational Video:
在YouTube上观看 - [824//1] x23e TrueNAS ZFS Pool Resilver over and over again issue | ZFS NAS Storage | Forever Resilver ↗

TOFFEE-DataCenter WAN Optimization - Google Hangouts Demo and VOIP Optimization ↗
Saturday' 13-Mar-2021

Network Packet Queue or Buffer - Packet Flow Control, Fragmentation and MTU ↗
Saturday' 13-Mar-2021
Network Packet Queue or Buffer - Packet Flow Control, Fragmentation and MTU

Internet optimization through TOFFEE-DataCenter WAN Optimization Demo ↗
Saturday' 13-Mar-2021

TOFFEE-Mocha WAN Emulation software development - Update: 1-July-2016 ↗
Saturday' 13-Mar-2021
Today I got a feature request from Jonathan Withers. Jonathan is from a company called MultiWave Australia. He said he is able to get the TOFFEE-Mocha Raspberry Pi setup up and with that he is able to emulate geostationary satellite link. But he requested me is there a way to extend the constant packet delay from 40mS to 500mS. So as a part of his request I supported the same in the current ongoing development version of TOFFEE-Mocha.

在YouTube上观看 - [444//1] 158 VLOG - TOFFEE WAN Optimization Software Development live update - 6-Nov-2016 ↗

WAN Optimization Network Stack Architecture - Linux Kernel vs Intel DPDK vs Custom Packet Forward ↗
Saturday' 13-Mar-2021

Research :: Optimization of network data (WAN Optimization) at various levels:
Network File level network data WAN Optimization

Learn Linux Systems Software and Kernel Programming:
Linux, Kernel, Networking and Systems-Software online classes [CDN]

Hardware Compression and Decompression Accelerator Cards:
TOFFEE Architecture with Compression and Decompression Accelerator Card [CDN]

TOFFEE-DataCenter on a Dell Server - Intel Xeon E5645 CPU:
TOFFEE-DataCenter screenshots on a Dual CPU - Intel(R) Xeon(R) CPU E5645 @ 2.40GHz - Dell Server