The TOFFEE Project
HOMEDOCUMENTATIONUPDATESVIDEOSRESEARCHDOWNLOADSPONSORSCONTACT


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


Recommended Topics:

The TOFFEE Project :: TOFFEE-Mocha :: WAN Emulator ↗
Saturday' 13-Mar-2021
The TOFFEE Project :: TOFFEE-Mocha :: Linux Open-Source WAN Emulator

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.

TOFFEE-Mocha - WAN Emulator :: TOFFEE-MOCHA-2.0.3-0-10-nov-2018-x86-64.iso ↗
Saturday' 13-Mar-2021
Download TOFFEE-MOCHA-2.0.3-0-10-nov-2018-x86-64.iso via Google Drive share: Live bootable x86-64 Debian Stretch 9.5 with light-weight LXDE UI ISO (includes source-code): TOFFEE-MOCHA-2.0.3-0-10-nov-2018-x86-64.iso You can find the source tar-ball in the /root folder. To know more about the project kindly refer TOFFEE- Mocha: News and Updates - Documentation. To know more about current specific release, objectives, features, release notes/updates, quick demo and future road-map, you can watch my video below.

Raspberry Pi as a Networking Device ↗
Saturday' 13-Mar-2021
Raspberry Pi is often used as a single board computer for applications such as IoT, hobby projects, DIY, education aid, research and prototyping device. But apart from these applications Raspberry Pi can be used for real-world applications such as in making a full-fledged networking devices. Raspberry Pi is a single board ARM based hardware which is why it is also classified as ARM based SoC. Since it is ARM based it is highly efficient, tiny form-factor and lower in power consumption with moderate computational power. This will allow it to work several hours on emergency battery backup power supply such as low-cost domestic UPS and or some renewable energy source, which is a prerequisite for a typical networking device.

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

TOFFEE with Hardware Compression and Decompression Accelerator Cards ↗
Saturday' 13-Mar-2021
You can build a basic TOFFEE WAN Optimization hardware completely in software layer (i.e its networking data-plane and control-plane). And if you are a product manufacturer you can make commercial WAN Optimization products with TOFFEE with software layer alone. And if you choose to improve its performance, you can use any third-party PCIe Compression Accelerator cards.



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

TOFFEE with Hardware Compression and Decompression Accelerator Cards ↗
Saturday' 13-Mar-2021
You can build a basic TOFFEE WAN Optimization hardware completely in software layer (i.e its networking data-plane and control-plane). And if you are a product manufacturer you can make commercial WAN Optimization products with TOFFEE with software layer alone. And if you choose to improve its performance, you can use any third-party PCIe Compression Accelerator cards.

WAN Optimization - Animated demo of Packet Optimization in TOFFEE-DataCenter ↗
Saturday' 13-Mar-2021

Setting up a WAN Emulator within VirtualBox ↗
Saturday' 13-Mar-2021



Featured Educational Video:
Watch on Youtube - [171//1] 169 Q&A - Add additional HardDrive or storage space in Linux VirtualBox VM ↗

TOFFEE WAN Optimization software development, roadmap, live-demo - Update: 06-Nov-2016 ↗
Saturday' 13-Mar-2021
Here are some of the screenshots of the new upcoming TOFFEE WAN Optimization release and live demo.

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

Demo TOFFEE-DataCenter WAN Optimization packaging feature ↗
Saturday' 13-Mar-2021

First TOFFEE-Mocha Code Release ↗
Saturday' 13-Mar-2021
TOFFEE-Mocha is my dream project which I thought working on it since several years. I want to make a WAN emulation software which is straight forward and simple to use. I used tc scripts along with iptables for testing my TOFFEE (and TrafficSqueezer before TOFFEE) and I am not quite satisfied with the same. As one can understand these scripts are not meant for WAN emulation.



Watch on Youtube - [889//1] 280 WAN Optimization - Animated demo of Packet Optimization in TOFFEE-DataCenter ↗

Tracking Live Network Application Data - in a WAN Acceleration (WAN Optimization) Device ↗
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