Compressed Web Runtime - start sites from DVD or CD as fast as from HDD
Introduction to Compressed Web Runtime
Starting from version 6.0 of Web Server for CD and DVD supports "Compressed Web Runtime" feature. It greatly speeds up startup time when server is run from CD and DVD - the startup time becomes equal to time of startup from HDD!
When Compressed Web Runtime is enabled, CDBuilder puts a zip archives with web server itself, mysql server, php interpreter and Perl interpreter (and other interpreters like Python and JRE) into special folders on CD/DVD (one direcory per each Operating System - one directory for Windows, one for Mac OS, one for Linux). On first run of the CD/DVD, the zip file for corresponding platform is unpacked to hidden permament directory on user's HDD. Then web server, mysql server and all script interpreters are started from that directory on HDD. All the web content (web documents and web scripts) continue to reside on CD/DVD. On second and subsequent run of such CD/DVD, a web server , mysql server and all script interpreters are run directly from HDD (no unpacking of them from CD/DVD is required). Compressed Web Runtime is supported on:- Windows
- MacOS X with Intel CPUs
- Linux
Performance and disk usage
Here you can see startup time of DVD with PHP and MySQL that is run on Windows 7, on desktop computer with HDD (not SSD), 8GB of RAM, Intel Core i5 CPU. We've measured time that it takes for browser window to appear after starting web server; we've done a reboot of computer before each test.
What was measured | Time in seconds |
---|---|
startup time from DVD, Without Compressed Web Runtime | 45 |
startup time from DVD, with Compressed Web Runtime, first run | 22 |
startup time from DVD, with Compressed Web Runtime, second and subsequent runs | 13 |
startup time from HDD (entire DVD was copied to HDD) | 10.6 |
Additional storage requirements
Below is amount of disk space required for Compressed Web Runtime on Windows, in case of CD/DVD with website that uses mysql and php-5.3:
- Additional storage on DVD - 22 Mbytes
- Additional storage on user's HDD - 53 Mbytes
Compressed Web Runtime FAQ
No, it makes sense to use CWR only for web servers placed on CD-ROMs and DVD-ROMs.
It's unpacked to %LOCALAPPDATA%/.stunnixws-cache/YOUR_PROJECT_ID on Windows, /Users/YOUR_USERNMAE/.stunnixws-cache/YOUR_PROJECT_ID on OSX and ~/.stunnixws-cache/YOUR_PROJECT_ID on Linux.
CDBuilder regenerates CWR each time you rebuild a Prototype. So you may wish to disable generation of CWR in CDBuilder in order to reduce time needed to build a Prototype.
To enable or disable CWR in CDBuilder, go to Project, Site settings, General, Main Properties and toggle checkbox "Generate Compressed Web Runtime". By default it's disabled.
No, CWR only for current platform is unpacked to user's HDD. So when CD-ROM with web server is run Windows, CWR for OSX won't be unpacked to user's HDD.
A build timestamp is stored along unpacked CWR on user's HDD. The timestamp is set to the date+time when you've build a Prototype in CDBuilder. If at startup an older CWR is detected on user's HDD, it will be deleted from HDD and new CWR will be unpacked from CD/DVD. This ensures that CWR on HDD is always of most recent version.
The behaviour of the project should not depend on whether CWR is enabled or not, so there is no need in testing your Prototype once CWR is enabled.