1. A system for reducing a memory space required to store an application written in a dynamic scripting language, the system comprising: an input/output device that receives a request corresponding to a segment of program code in a program module in the dynamic scripting language; an on-demand loader that determines whether or not the segment of program code is in a memory and identifies, in response to having determined the segment of program code is not in the memory, a location in a storage where at least a portion of the program module containing the segment of program code is stored, locates the segment of program code in a second copy of the portion of the program module, and copies the segment of program code into a first copy of the program module in the memory; and a code loader that loads the second copy of the portion of the program module containing the segment of program code from the storage into the memory.