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:

TOFFEE (and TOFFEE-DataCenter) deployment in SD-WAN Applications ↗
Saturday' 13-Mar-2021
Software-Defined Wide Area Networking (SD-WAN) is a new innovative way to provide optimal application performance by redefining branch office networking. Unlike traditional expensive private WAN connection technologies such as MPLS, etc., SD-WAN delivers increased network performance and cost reduction. SD-WAN solution decouple network software services from the underlying hardware via software abstraction.

iPerf Network Optimization - WAN Optimization Demo ↗
Saturday' 13-Mar-2021

Moon Base and Space Colonization - First we need fast InterPlanetary Internet ↗
Saturday' 13-Mar-2021

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

How to check a website using CDN ? ↗
Saturday' 13-Mar-2021

Detect and Monitor Failing Harddrive in Linux - My Seagate 500GB HDD Died ↗
Saturday' 13-Mar-2021
My 500GB Seagate Barracuda 7200RPM hard-drive suddenly started making mild clicking noise. I found this happening since morning. I was suspicious that something wrong in this drive and when I opened the Linux Disks app, I can find the cause of this issue. The disk is increasingly getting read errors. Besides I can see various other parameters such as Power-On Hours, Temperature, Head flying hours, etc.

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


CDN Introduction - Content Delivery Networks or Content Distribution Networks ↗
Saturday' 13-Mar-2021

Replacing in Lab Intel Core i7 5820K Desktop PC with Intel Celeron 1037U Mini-PC ↗
Saturday' 13-Mar-2021
As a research experiment I replaced my Intel Core i7 5820K desktop PC with my Intel Celeron 1037U Mini-PC as my everyday desktop system. This is an attempt to reduce my overall monthly power consumption. As well an attempt to do feasibility tests and research to know how far Mini PC will dominate the market in future and to study the real potential of Mini PCs.

TEST CASES :: TEST RESULTS :: Raspberry Pi WAN Emulator TOFFEE-Mocha-1.0.14-1-rpi2 ↗
Saturday' 13-Mar-2021

A study on WAN Optimization Techniques ↗
Saturday' 13-Mar-2021
There are various techniques with which one can optimize their WAN Network Data. Any long distance communication can be considered as WAN Network. A decade ago any network connecting two countries, considered as a WAN network, and a network within a city as MAN and soon. But these days in general any long distance communication is considered as WAN Network. Such as your Mobile communication networks, Satellite networks, Space Networks (Deep space networks), Trans-Atlantic cable networks, etc.



Featured Educational Video:
Watch on Youtube - [4073//1] 0x1c9 NAS OS | Expert's take on FreeNAS vs UNRAID | My two cents | Best Tips ↗

Why TOFFEE is forked from TrafficSqueezer ↗
Saturday' 13-Mar-2021
TrafficSqueezer is an open-source WAN Optimization project. TrafficSqueezer is mainly a research project which is started around mid-2006. It is initially started as a research (or prototype) code even before it is officially registered in Sourceforge.net. But this code is just primitive user-space raw socket modules. This is later refined and a pre-alpha version is created. Followed by which Alpha release. This prototype code is moved from user-space to Linux Kernel (Kernel Space) and then the journey begin in terms of making a serious WAN Optimization solution. Once the pre-beta and beta releases are complete the mainstream series is started.

Introducing TOFFEE-Butterscotch - Save and Optimize your Internet/WAN bandwidth ↗
Saturday' 13-Mar-2021
TOFFEE-Butterscotch yet another variant of TOFFEE can be used to save and optimize your Home/SOHO Internet/WAN bandwidth. Unlike TOFFEE (and TOFFEE-DataCenter) TOFFEE-Butterscotch is a non peer-to-peer (and asymmetric) network optimization solution. This makes TOFFEE-Butterscotch an ideal tool for all Home and SOHO users.

TOFFEE-DataCenter screenshots on a Dual CPU - Intel(R) Xeon(R) CPU E5645 @ 2.40GHz - Dell Server ↗
Saturday' 13-Mar-2021

TOFFEE-DataCenter a TOFFEE variant for Data Center applications ↗
Saturday' 13-Mar-2021



Watch on Youtube - [1888//1] Deep Space Communication - Episode1 - Introduction ↗

TOFFEE-Mocha Documentation :: TOFFEE-Mocha-1.0.18-1-x86_64 ↗
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