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: - i.e. it's supported on every platform SAWS supports besides Mac OS X with PowerPC CPU (i.e. on computers produced before 2006).

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 measuredTime in seconds
startup time from DVD, Without Compressed Web Runtime45
startup time from DVD, with Compressed Web Runtime, first run22
startup time from DVD, with Compressed Web Runtime, second and subsequent runs13
startup time from HDD (entire DVD was copied to HDD)10.6
As you can see, the startup time is 3 times less when Compressed Web Runtime is enabled, and it's almost the same as when directly running from HDD (13 seconds vs 10.6 seconds). If SSD is used instead of HDD in the computer, the startup time would be about 4 seconds.

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:

The additional storage for Mac OS X and Linux is roughly the same. So it's very small compared to total size of DVD and modern HDDs.

Compressed Web Runtime FAQ

Does it make sense to use CWR if my product is for USB devices or distributed as downloadable archive?

No, it makes sense to use CWR only for web servers placed on CD-ROMs and DVD-ROMs.

What directory CWR is unpacked to on user's HDD?

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.

When CDBuilder updates CWR of the Prototype?

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.

How to enable/disable CWR in CDBuilder?

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.

If I produce CD/DVD with support for Windows, Mac and Linux, will CWR for all platforms be unpacked to user's HDD?

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.

How to update CWR 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.

I was testing my Prototype when CWR was disabled in project settings. Now I enabled it - do I have to retest my project?

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.